Explore Dynamics 365 Business Central on Microsoft LearnDiscover features, benefits, and examples of Dynamics 365 Business Central in action in this short training module.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
I am writing code in event like " i:=i+1 " , I want increment i ( i is global variable in my custom Code unit) value when event triggered(the event is exist in "Repeat and Until" condition) .but my doubt is , will the global variable( i ) value clear after every event call or it stores Previous value for further increment operation .
It depends on how you code and declare the codeunit. It's hard to tell without actually looking at your code.
Below is standard code in 5763(Whse.-Post Shipment) Code unit in Business Central
and I wrote Event.
here CounterSourceDocTotal is global variable in my Custom Code unit.
in my custom code I need CounterSourceDocTotal Variable value from standard code unit "5763(Whse.-Post Shipment)" ,but there is no event with this variable as parameter, So I wrote this code for getting value of CounterSourceDocTotal value by defining CounterSourceDocTotal as global variable in my custom code unit.
Don't think your global variable will work because your global variable only exists in the subscriber codeunit.
Not sure if this will work, but there is a Single Instance property in the codeunit. I have done in NAV, but never in BC inside event subscriber. You can try testing it.
Business Applications communities