web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Table field event handler recap in Microsoft Dynamics 365 Finance and Operations apps

Rahul Mohta Profile Picture Rahul Mohta 21,032

Table field event handler recap in Microsoft Dynamics 365 Finance and Operations apps

 /// <summary>

    ///

    /// </summary>

    /// <param name="sender"></param>

    /// <param name="e"></param>

    [DataEventHandler(tableStr(CustGroup), DataEventType::ModifiedField)]                                ------this is table field level event handler (Framework event) - preferred way

    public static void CustGroup_onModifiedField(Common sender, DataEventArgs e)

    {

        CustGroup   cgrp;

 

        cgrp=sender;

 

        if(sender.datasource().object(fieldNum(CustGroup, PaymTermid)).getvalue()  ==  "Net30")

        {

            info("Cust group with payment term N30");

            cgrp.Name="123";

        }

            else

        {

            info("Cust group WITHOUT payment term N30");

            cgrp.Name="789";

        }

           

    }

Comments

*This post is locked for comments