14 Apr 2013

When and How to use Cacheaddmethod

Caching of display methods has been introduced to improve the performance of display and edit functions if they are calculated on the AOS, and to improve the performance when records are transferred from the server to the client.

Cacheaddmethod adds a display method to the cache. Once calculated the result of the method is passed to the client. Only display methods may be cached and only methods on table may be cached.
.cacheAddMethod(str _methodName [,boolean _updateOnWrite = true])
_methodName
the name of the display method of the table used in this datasource
_updateOnWrite
if true, the content of the cache will be refreshed on record write.
The cache is refreshed on reread and create.
The display method is added to the cache in the init() method of the form datasource.

void init()
{
super();

this.cacheAddMethod(tableMethodStr(ProjJournalTrans, ProjName));
}

1 comment:

SANTHOSH... said...

nice one

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...