Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Update form using class reg.

Posted on by 560

Hi,

I have created a form and based on some conditions the form will be get updated by clicking a button.

Up to this everything is working fine and the form is getting updated based on the conditions and I have written code in the form level.

But what I want to do is, I want to do in this class and I don't want to write any code on the form level.

Can you please suggest some advice.

Regards,

AxTechie

*This post is locked for comments

  • Suggested answer
    startax Profile Picture
    startax 1,845 on at
    RE: Update form using class reg.

    Hi ,

    Create a class and write you current logic in class

    use simple button and override clicked() method of button. pass parameter in your class method and then refresh form data source.

  • Suggested answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Update form using class reg.

    Hi AXTechie2120!

    There are many ways to do it.

    You can use MenuItems that call classes and put parameters through args (take a look at InventJournalTransfer form and InventJournalDeleteTrans menu item button as example)

    You can use clicked() method on the button and call your class and put parameters through parm methods.

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans