Notifications
Announcements
No record found.
Hi,
What is a display field and how can we create it? Does it have something to do with a display method we create in a table and tie it to a form control?
Additionally, when do we usually use them?
Thank you.
A display field is a field that displays a result of a display method.
You create it by adding a field on your form, and setting DataSource and DataMethod properties to point to a display method on your table, or form data source.
They are used to display data that is based on calculations, and/or not directly available in the form data sources.
docs.microsoft.com/.../using-the-display-method-modifier
Hi Shawn,
For an example of display method, you can take an example of CustTable\name method. The customer name is stored in DirPartyTable. This display method queries and fetches the name. This can be used on a form or on a custom lookup.
Hi ShawnDEV,
Display field is the field whose value comes from display method.
You can extend your form to create the display method , e.g.
public static class PurchTable_Extension { [SysClientCacheDataMethodAttribute(true)] public static display PurchReqId PurchReqId (PurchTable _this) { PurchReqTable PurchReqTable; select PurchReqTable where PurchReqTable.PurchId == _this. PurchId; return PurchReqTable.PurchReqId; } }
Then create a control in the form design and set the following properties to tie the method:
Data source: PurchTable
DataMethod: PurchTable_Extension::PurchReqId
CacheDataMethod: Yes.
See:anithasantosh.wordpress.com/.../
Hi
I thought that we could create a table extension first and then add a display method in there without having to add decorations like “ExtensionOf” attribute. Then create a form extension and add a string control and tie the display method to it.
But in WILL WU's response, a new class has been created with decorations and the display method in that class is referred to a form extension.
Would both be possible ways to do this?
The attribute decoration "ExtensionOf" is not mandatory for display method and the method itself is a static method. But you could use the same class for CoC on other methods for the table and it would be better to have one extension class for the table object.
Hi ShawnDEV,
In D365FO, you won’t be able to add the new method or modify the existing method to the standard table or to an extension table.
If you want to make changes to an standard form (add display fields or modify display method), you have to use the extension class.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 449 Super User 2025 Season 2
Martin Dráb 422 Most Valuable Professional
BillurSamdancioglu 239 Most Valuable Professional