In Dynamics 365 for Operations, we don’t have the option to create methods on table extension, so we should use the extension class to do that.
In this article, we will see how to create a display method on the table extension class and use it on a form extension.
First, create your table extension class and your display method following the example below: In this case, I took an example of the HcmJob table and I want to create a job id + description display field
Public static class HcmJob_Extension
{
[SysClientCacheDataMethodAttribute(true)]
public static display Description jobDescription(HcmJob _this)
{
return strFmt("%1-%2",_this.JobId, HcmJobDetail::findByJob(_this.RecId).Description);
}
}
To use your display method on the form, create your new string control on the form extension and use the property as below:

To cache your display method on the form set on the field the property “Cache Data Method” = yes if you don’t want to use the Attribute above.
That’s it! We are done with the new display method. Build/ sync your project and check with a new form.
1 Comment
[…] the table extension class and use it on a form extension. First, create your table extension…… Continue Reading → Read Complete Post and Comments SBX – Two Col […]