Skip to content

Conversation

@joandrsn
Copy link

Summary

Enables access to hardcoded WorkFlow-names.
The changed code does not change the actual functions I want exposed, since the whole object is now Public. The functions I want are EDocReceived, EDocImport, EDocSendEDocResponseCode, EDocCreated & EDocStatusChanged

Work Item(s)

Fixes #28326

@joandrsn joandrsn requested review from a team as code owners March 15, 2025 16:08
@github-actions
Copy link
Contributor

Issue #28326 is not valid. Please make sure you link an issue that exists, is open and is approved.

@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Mar 17, 2025
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.

Minor change then we can merge it in.


codeunit 6139 "E-Document Workflow Setup"
{
Access = Internal;
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep the EDocReceived, EDocImport and EDocStatusChanged internal.

@joandrsn
Copy link
Author

joandrsn commented May 2, 2025

Hi @Groenbech96.

That makes no sense.

I will try to explain the issue further:

The codeunit has the following internal procedures (Which can ONLY be called in this app):

InsertSendToSingleServiceTemplate
InsertSendToMultiServiceTemplate
EDocReceived
EDocImport
EDocSendEDocResponseCode
EDocCreated
EDocStatusChanged

Of these, I want to be able to have the 5 procedures public (For me to be able to avoid hardcoding the vales in my app):

EDocReceived
EDocImport
EDocSendEDocResponseCode
EDocCreated
EDocStatusChanged

In order to do this, I have to change the access of the whole object to Public, while marking the procedures I do NOT want to be public to be internal.

This PR does exactly this. Another way could have been to create a new codeunit and then expose those 5 procedures.

Hope to hear from you. Thank you!

@Groenbech96
Copy link
Contributor

Hi @Groenbech96.

That makes no sense.

I will try to explain the issue further:

The codeunit has the following internal procedures (Which can ONLY be called in this app):

InsertSendToSingleServiceTemplate
InsertSendToMultiServiceTemplate
EDocReceived
EDocImport
EDocSendEDocResponseCode
EDocCreated
EDocStatusChanged

Of these, I want to be able to have the 5 procedures public (For me to be able to avoid hardcoding the vales in my app):

EDocReceived
EDocImport
EDocSendEDocResponseCode
EDocCreated
EDocStatusChanged

In order to do this, I have to change the access of the whole object to Public, while marking the procedures I do NOT want to be public to be internal.

This PR does exactly this. Another way could have been to create a new codeunit and then expose those 5 procedures.

Hope to hear from you. Thank you!

Let me try and explain my reasoning:
The import and received procedures has been added, but are not integrated into the framework. So there is no reason to make it public, if we end up not wanting it. So I am curious why you need them?

@joandrsn
Copy link
Author

joandrsn commented May 5, 2025

Thank you for the explaination @Groenbech96, that helped.
We are using the functions to push a default setup for our customers (Using Assisted Setup). We currently only use the workflow codes EDOCSendEDOCRESPONSE and EDOCCREATEDEVENT, so I have changed the visibility of the functions.
I just thought other customers/partners might have the same issue as us and therefore extended the visiblity to the other codes in the codeunit.

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.

Approved.

@Groenbech96
Copy link
Contributor

Groenbech96 commented May 26, 2025

merged internally. targeted for 26.2

@joandrsn joandrsn deleted the expose-edoc-functions branch May 26, 2025 14:11
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request-For-External] Codeunit 6139 "E-Document Workflow Setup" - Workflow codes from Internal to Global

3 participants