Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Modified Field Method

Posted on by Microsoft Employee

I have a form, contains: field A, field B, field C

field A is lookup value numberID, when I choose one of numberID in lookup field A, the value can automatically full-fill at field B and field C. Can you make example for the modified script?

*This post is locked for comments

  • Suggested answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Modified Field Method

    On the modified method of Field A, you can include following code

    public boolean modified()

    {

       boolean ret;

       ret = super();

       FormDataSource.FieldB = XYZ;

       FormDataSource.FieldC = XXX;

       return ret;

    }

    (Or)

    On the modifiedField method on the table, you can use following code

    public void modifiedField(FieldId _fieldId)

    {

       super(_fieldId);

       case fieldNum(Table, FieldA):

       this.FieldB = XYZ;

       this.FieldC = XXX;

    }

    Check modifiedField method of table SalesLine (for reference) for below cases.

    case fieldNum(SalesLine, LinePercent):

    case fieldNum(SalesLine, SalesPrice):

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans