Monday 22 April 2019

display method in d 365 extension

1. Add a project
2.create a  new class VendPackingSlipJour_Extension for writing code in vendpackingslipjour table


[ExtensionOf(tableStr(VendPackingSlipJour))]
final public static class VendPackingSlipJour_Extension
{
    [SysClientCacheDataMethodAttribute(true)] //This attribute will cache your display method.
    public static display Name internalpcakingslipno(VendPackingSlipJour _this)
    {
        return "text";
    }

}

3. create a extesion of the form

VendPackingSlipJournal.Extension an add a string over there

datemethod as :VendPackingSlipJour_Extension::internalpcakingslipno
and datasource as VendPackingSlipJour

add a startup project as PurchTable (PurchTable.Extension1)

then run the program atlast when we navigate the product recipt of the Po we will get the new display method over there

we can also write like this

[ExtensionOf(tableStr(VendPackingSlipJour))]
final public class VendPackingSlipJour_Extension
{
    [SysClientCacheDataMethodAttribute(true)] //This attribute will cache your display method.
    public display Name internalpcakingslipno()
    {
        return "text";
    }

}

and can call the datamethod as VendPackingSlipJour_Extension.internalpcakingslipno

here please make sure we add
[ExtensionOf(tableStr(VendPackingSlipJour))]

and _Extension please pay extra attention to the spelling of the "extension" if it goes wrong the display method wont work.


intercompany PO multiple product receipt by x++

public void processStampICPO(PackingSlipId _deliveryNote,                             Transdate _deliverydate,                             ...