The value of all cached methods is set when data is fetched from the back-end database. In addition, the value is refreshed when the reread method is called on the form data source.
Add a display Method to the Cache
Locate the form that the method is used on.
Expand the Data Sources node.
Right-click the data source that the method is associated with, and then select Override Method > init.
Call the FormDataSource.cacheAddMethod method after the call to super() in the init method.
The first parameter for cacheAddMethod determines the name of the method to be cached. The second parameter (set to true by default) determines whether the value of the display method is updated when a record is written to the database.
[SysClientCacheDataMethodAttribute(true)]
public display Reasoncode display_ReasonCode()
{
reasoncode ret = '';
.......
return ret;
}
public display Reasoncode display_ReasonCode()
{
reasoncode ret = '';
.......
return ret;
}
No comments:
Post a Comment