Display methods in Form unbound control for Microsoft Dynamics 365 for Operation(D365 or O365)

A Display method is used to display a calculation or data from another table.  The method modifier display is added to the beginning of the method definition line to allow the return value to be displayed on a form. Display methods can be created either on a table or on a form DataSource.  If it is created on the form DataSource, then it takes the table as a parameter.  If possible, a display method should be created on the table itself, but there are situations where it has to be on the form DataSource, for example, if it uses an unbound control on the form.  Extension methods enable you to extend tables by creating new display and edit methods on these tables without overlaying X++ code.

For example, the class displayed here shows how you can extend the FMVehicle table — so here we are — with an extension display method named CupHoldersDisplay.  On a form or form extension, you can bind a control to this display method by setting DataSource equals FMVehicle and DataMethod equals FMVehicle_Extension CupHoldersDisplay

 

1

just notice you have to defined display method associated Data sources with double colon (::) which is highlighted.

2

 

Thanks

Ajay Vishwakarma

Advertisements

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 )

Google+ photo

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

Connecting to %s