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

Call a form control button cliked method from another form control button eventhandler

(2) ShareShare
ReportReport
Posted on by 111
hi
i have a standard form , on ok button i want to wirte logic for calling another standard form controll button clicked method 
i.e.,
on positng picking list, i want to automatically registration it. thats it.
can anyone guide me?
Categories:
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    Posting does not happen in a form. There is a whole framework (FormLetter) for posting; a form can only trigger the action. Putting the logic on a button click would be wrong, for several reasons. For example, the posting may be merely scheduled to run in batch, therefore you'd try to run your extra step before posting happened. Maybe you don't even know what will be posted, because the user may set just query criteria to find matching orders during posting. You should also take database transactions into account.
  • Dyn_US Profile Picture
    111 on at
    @martin drab sir
    my requirements is when positing picking list, it would automatically registeration it (Sales order).
    now i am writing logic on oK Command button of posting picking list (SalesEdit lines form), and want to call click method of form "WMSPickingRegisteration" command button control "updateAll" and other method which used for registeration.

    thats why i am asking that how call a form button control method on anoter form.
    i am not distrbing the posting procedure of posting picking list.
    is it so? kindy correct me if i am wrong or give me right approach
  • André Arnaud de Calavon Profile Picture
    301,109 Super User 2025 Season 2 on at
    Hi Dyn US,
     
    What is the reason for updating the registration when posting a picking list? In that case, you can also completely bypass the picking list process and just post the packing slip. It would only create additional transactions without real purpose. Maybe there is something I'm overlooking here but I would challenge this requirement.
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    , there is no point talking about how to call a button from another button, because it's a completely wrong design and it wouldn't work correctly. It ignores a lot of standard logic (I mentioned some of the problems below) and it doesn't even meet your own requirements. You said that it should happen when on positng picking list, but the button click isn't the same thing as posting. A posting my by triggered by a batch or any other code (not by a button click), user may close the dialog (opened by the button) without posting, there may be no order actually posted and so on.
     
    If you want something to happen on posting, you need to put to the posting logic.

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 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans