Tuesday, 4 September 2018




How to modify Table Existing method in D365


This method is use to modify existing method of table , here i am going to use 
Sales Line method initfromSalesQuotationLine.

in this case i am going to use Chain of Command. this is very useful Technic to modify existing mathod.

1. create new class with _Extension
2. use Extensionof for your table which you want to modify
3. use this mathod according you REQUIREMENT. 

Check the method in table

[ExtensionOf(tableStr(SalesLine))]


final class AksExtensiontablemath_Extension
{
   
    // this mathod is used to fatch data from sales quotation table to sales line after SQ confirmation
    public void initFromSalesQuotationLine(SalesQuotationLine      _salesQuotationLine)
    {
        next initFromSalesQuotationLine(_salesQuotationLine);
        this.Aks_givenDiscount = _salesQuotationLine.Aks_GivenDiscount;
    }

}






Thanks
Akshay

No comments:

Post a Comment