Skip to content

[E-Document] Fornav.edoc.init #28554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

renebrummel
Copy link

@renebrummel renebrummel commented Apr 29, 2025

Summary Added FORNAV Peppol App

Work Item(s)

Fixes #28553

Fixes AB#572834

@renebrummel renebrummel requested a review from a team as a code owner April 29, 2025 07:06
@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label May 5, 2025
@renebrummel
Copy link
Author

@microsoft-github-policy-service agree [company="{FORNAV}"]

@renebrummel
Copy link
Author

@microsoft-github-policy-service agree company="FORNAV"

@JesperSchulz JesperSchulz changed the title Fornav.edoc.init [E-Document] Fornav.edoc.init May 9, 2025
@github-actions github-actions bot added the linked Issue is linked to a Azure Boards work item label May 9, 2025
@Groenbech96
Copy link
Contributor

@renebrummel build is failing. Can you take a look

Copy link
Contributor

@Groenbech96 Groenbech96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files name and object names have to match. Please add the ruleset for bcapps, to correct these and other things that dont follow the rule set.

@Groenbech96
Copy link
Contributor

@renebrummel more failures :)

@renebrummel
Copy link
Author

@renebrummel more failures :)

Fixed, it does not help that the codecop warning is hidden by default.

Copy link
Contributor

@pri-kise pri-kise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several labels, tooltips, captions marked as locked. This prevents the translation - therefore I would suggest to remove Locked from those.

var
PeppolJobQueue: Codeunit "ForNAV Peppol Job Queue";
PeppolOauth: Codeunit "ForNAV Peppol Oauth";
begin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it isn't a good practice to automatically create Job queue entries when the app is installed or upgraded.

Since the code not only only creates the job queue, but also enqueues the job queue this will fail if an the Installation/Upgrade is performend by a GDAP user.

SendContext: Codeunit SendContext;
HttpRequest: HttpRequestMessage;
HttpResponse: HttpResponseMessage;
SendApproveRejectCheckStatusErr: Label 'You cannot send %1 response with the E-Socument in this current status %2. You can send response when E-document status is ''Imported Document Created''.', Comment = '%1 - Action response, %2 - Status', Locked = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this lable locked?
This will prevent the translation of this error message?


var
ForNAVAPIRequests: Codeunit "ForNAV API Requests";
UnsuccessfulResponseErr: Label 'There was an error sending the request. Response code: %1 and error message: %2', Comment = '%1 - http response status code, e.g. 400, %2- error message', Locked = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are those error labels locked?
This will prevent the translation.

procedure ObtainPrivacyConsent(): Boolean
var
CustConsentMgt: Codeunit "Customer Consent Mgt.";
CustomConsentMessageLbl: Label 'Please agree to the ForNAV EULA: https://www.fornav.com/documents/EULA.pdf', Locked = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this label locked? This will prevent the translation.

EDocumentLogHelper.InsertLog(EDocument, EDocumentService, TempBlob, "E-Document Service Status"::Imported);
end;

local procedure GetEdocumentService() EDocumentService: Record "E-Document Service"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't depend on the name FORNAV for the E-Document Service.

jLicense.Add('EnvironmentName', EnvironmentInformation.GetEnvironmentName());
end else
jLicense.Add('SerialNumber', Database.SerialNumber);
if NavApp.GetModuleInfo('63ca2fa4-4f03-4f2b-a480-172fef340d3f', AppModuleInfo) then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which appId is this?
Should this be the AppId of the current app?

field(Code; Rec."Identification Code")
{
ApplicationArea = All;
ToolTip = 'Specifies the Identification Code.', Locked = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ToolTips here shouldn't be locked.
Furthermore they could be moved to the table.

TempBlob: Codeunit "Temp Blob";
AzureADTenant: Codeunit "Azure AD Tenant";
EnvironmentInformation: Codeunit "Environment Information";
BodyText: BigText;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of BigText for String Concatenation it's recommend to use a TextBuilder.

exit('********');
end;

[BusinessEvent(false)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks incorrect for me.
Why is this procedure marked as a BusinessEvent?

using Microsoft.Foundation.Reporting;
using System.Automation;

table 6414 "ForNAV Peppol Setup"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The caption for this table and for the fields in this objet sholdn't be locked that those are translated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration GitHub request for Integration area linked Issue is linked to a Azure Boards work item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BC Idea]: Enable ForNAV Peppol connector for E-Documents
4 participants