Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
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 TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming 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