Notifications
Announcements
No record found.
Hello, I cannot access the global variables in visual studio code connected to NAV 2018. What is the workaround to this? Thanks,
*This post is locked for comments
What do you mean by access?
In AL a global variable is declared using:
var
MyCustomer: Record Customer;
This is declared at object level.
If you declare a variable inside an event or a procedure, this variable is local to the event/procedure itself.
Hi Stefano,
I have related question for you. Please help me out.
when i'm trying to publish event of "OnBeforePostItemJnlLine" from codeunit "Item Jnl.-Post Line" in a new codeunit extension. i'm not able to use global variables of codeunit "Item Jnl.-Post Line" in my codeunit extension where i used "OnBeforePostItemJnlLine" event. any idea regarding this issue, How to use base code unit global variables in extension codeunits.
Thanks & Regards,
Prasanna.
Fot that, the Integration event (Publisher) must have GlobalVarAccess = true. This property is only available when the Event Property is set to Publisher and the EventType Property is set to Integration.
You must add variable parameters to the event subscriber functions manually and use a name and type that matches the variable declaration in the event publisher object.
Normally many MS events does not have GlobalVarAccess set to true. In this case you cannot access global variables.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.