Dynamics ax 365 display method
As we cannot create new method in exiting (Microsoft don't recommend overlayering) or extension table. We have to create extension class to add display method.
First you have to create extension and add display method in it.
public static class CustTable_Extension
{
[SysClientCacheDataMethodAttribute(true)]
public static display str customerGroup(CustTable_this)
{
CustTable custTable;
select custTable
where custTable.AccountNum== _this.AccountNum;
return custTable.CustGroup;
}
}
To use this method in form you have to set DataMethod as CustTable_Extension::customerGroup and CacheDataMethod as YES.
First you have to create extension and add display method in it.
public static class CustTable_Extension
{
[SysClientCacheDataMethodAttribute(true)]
public static display str customerGroup(CustTable_this)
{
CustTable custTable;
select custTable
where custTable.AccountNum== _this.AccountNum;
return custTable.CustGroup;
}
}
To use this method in form you have to set DataMethod as CustTable_Extension::customerGroup and CacheDataMethod as YES.
Comments
Post a Comment