Dynamics 365 for Finance and Operations Development Cookbook - Fourth Edition
by Abhimanyu Singh, Deepak Agarwal
How it works...
In this recipe, we created a new display method in the CustGroup table to show the description of Terms of Payment, which is defined in a Customer group record. In the method, we use a query to retrieve only the Description field from the PaymTerm table. Here, we can use the find() method of the PaymTerm table, but that will have decreased the display method's performance, as it returns the whole PaymTerm record when we only need a single field. In a scenario such as this, when there are only a few records in the table, it is not so important; however, in the case of millions of records, the difference in the performance will be noticeable. This is precisely why we need to cache the display method that we have covered in this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access