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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Want to execute a method if a field is blank previously but now entered with a new value.

(0) ShareShare
ReportReport
Posted on by 518

Hi all,

Want to execute a method if a field is blank previously but now entered with a new value.

And that new value is used in that method.

How can i do this and on which method of the table i should write the code to do this.

Thanks and regards

Siddhant Singh

I have the same question (0)
  • Michal Krejza Profile Picture
    on at

    Hi Siddhant,

    In which area do you need to prepare such a solution ?

  • Mahmoud82 Profile Picture
    50 on at

    I hope I understood you correctly 

    you can use the modifiedField method to do this

    • you can use switch case or if statment to check which field exactly changed 
    • make sure that the super method is before the new code to get the new value of the modified field 

    public void modifiedField(fieldId _fieldId)

    {

    super(_fieldId);

    switch(_fieldId)

    {

    case fieldnum(MyTable, custAccount):

        this.CurrencyCode="";

        break;

    default:

    }

    }

  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Hi Siddhant Singh,

    As mentioned here you need to override modifiedField  field on the table level and add your logic there, if you want to check that field was blank before you can this.orig() nuxulu.com/.../Understanding_modifedField_Table_method_in_DAX_2012.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans