Quantcast
Channel: Dynamics 365 Business Central/NAV User Group
Viewing all articles
Browse latest Browse all 11285

Blog Post: CURRENTCOMPANY Function in NAV 2016

$
0
0
Hi All, There is new function coined by microsoft in NAV 2016 that is "CURRENTCOMPANY". If you change the company by using CHANGECOMPANY Function then the reference of Changed company will store in CURRENTCOMPANY. If you are running a report in 'COMPANY 1' and then you change the company to 'COMPANY 2'. Example - Just write the code on OnPreReport Trigger of any report and run the report in 'COMPANY 1' Item.CHANGECOMPANY('COMPANY 2 '); MESSAGE(CURRENTCOMPANY); MESSAGE(COMPANYNAME); MESSAGE will show the output as- CURRENTCOMPANY: 'COMPANY 2' COMPANYNAME: 'COMPANY 1' This CURRENTCOMPANY function is very useful when you are doing the data updation by using batch report.

Viewing all articles
Browse latest Browse all 11285

Trending Articles