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
    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.


Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: