Enter the key words to find the related topics

D365 Table Event handler

DataEventType::Inserting 

[DataEventHandler(tableStr(PurchLine), DataEventType::Inserting)]
    public static void PurchLine_onInserting(Common sender, DataEventArgs e)
    {
        PurchLine purchLine = sender as PurchLine;

        if (InventTable::find(purchLine.ItemId).TrackingNum)
        {
            purchLine.TrackNumber =  purchLine.VendAccount + purchLine.PurchId;
        }
    }

DataEventType::Updating

 [DataEventHandler(tableStr(PurchLine), DataEventType::Updating)]
    public static void PurchLine_onUpdating(Common sender, DataEventArgs e)
    {
        PurchLine purchLine = sender as PurchLine;
        if (InventTable::find(purchLine.ItemId).TrackingNum)
        {
            purchLine.TrackNumber =  purchLine.VendAccount + purchLine.PurchId;
        }
        else
        {
            purchLine.TrackNumber =  #EmptyString;
        }
    }

DataEventType::Inserted

 [DataEventHandler(tableStr(RetailCustAffiliation), DataEventType::Inserted)]
    public static void RetailCustAffiliation_onInserted(Common sender, DataEventArgs e)
    {
        RetailCustAffiliation retailCustAffiliation = sender;
        if (retailCustAffiliation.CustAccountNum)
}



No comments:

Post a Comment