If I have a new field in the baccount record call sub type, it is an integer and has description attribute. How can I use this to load or not load a specific businessaccountmaint graph extension, when the baccount record sub type is given value?
Asked
Active
Viewed 233 times
1 Answers
0
The value of IsActive property of a graph extension is stored in the page's cache (which means it's evaluated only once at the page initialization) , so you should have the condition evaluated on true/false outside before any BAccount record is loaded in the BusinessAccountMaint graph.
IsActive works with values from setup pages, for example "Enable certain baccount type" i.e. CRSetup.UsrType1BAccount = 1.
However, when you change the value in the setup page, the cache must be invalidated. Please note that's an expensive action with regard to performance:
PXDatabase.ResetSlots();
PXPageCacheUtils.InvalidateCachedPages();
More details here:

Lucian
- 309
- 2
- 8