We have developed some addon's in our own local object ID range and we each time check in customer license whether they have permissions to run those object like
IF Granules."XXX" THEN
EXIT(CheckObjectLicensePermission(LicPerm."Object Type"::Codeunit,CODEUNIT::XXX));
But it is adding nearly 2 sec more while posting Sales Order.
Is there any method we can reduce no. of checks?
Comments
So if there is a record in the Bin table (example) you have access to that module.
That's how NAV does it.
Maybe it is not that obvious in the code anymore since business ready licensing. Before when NAV had granules it was more Obvious and changes where higher that you would run into issues.
based on the activation of granule we need to either run Custom Code or Base code.
Ex:
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
we made that codeunit as Single Instance and created a global variable which will identify whether license is already checked before or not.
It will execute one time and from next time onwards returns result rather than checking everything.
Hope it helps.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav