Let us try adding a display method to a form where a new has been added to the Extension form . Since this is an extension form, a new display method cannot be added directly to this form or table. In D365 FO, there is a slight difference in creating this . So, whenever there is an extension in D365 FO, in order to implement a process, we create a class first. So as a first step here, we are creating a class , but we use “Final” keyword .
We need to mention for which object this class has been created. So decorate the class with “ExtensionOf” attribute. In this discussion, I am creating a display method for the table “SalesQuotationLine”.
Add the attribute to cache the display method.// only for Display method.
[ExtensionOf(tableStr(SalesQuotationLine))]
final public class AE_SalesQuotationLineTbl_Extension
{
[SysClientCacheDataMethodAttribute(true)]
public static display Qty fulfillmentRemainingQty(SalesQuotationLine _this)
{
//logic
}
How do we refer this method in the form?
Please note the property “Cache data method” is set to Yes when the display method is referred.
No comments:
Post a Comment