Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Which event handler will I choose for update all the existing records of field values assign through event handler

(0) ShareShare
ReportReport
Posted on by 35

I tried onupdating but it is selecting only one record at a time I need to update all the records of myinventlocationId field values in the InventTable.

Can you suggest me which event handler use useful for update all records through event handler class.

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: Which event handler will I choose for update all the existing records of field values assign through event handler

    We have discussed it in another thread, this is a development practice requirement. As discussed, issue is that it's not a business requirement and it doesn't tell from where you should get myLocationId field and why to use event handler only.

  • Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    RE: Which event handler will I choose for update all the existing records of field values assign through event handler

    You should have rejected such a requirement, because - as you see - it doesn't allow you to design a solution. It's a bunch of implementation details without describing the goal.

    Which event handler you should use (if any) depends on what event you want to react to, not what code you want to execute.

    Also, "to use an event handler" isn't a business requirement. You're the developer; it's your responsibility to choose the appropriate technical solution for the given business requirement. But you can't design a solution without knowing what it should do, therefore ask your key user or a functional consultant to explain the business goal to you, instead of trying to design code on your behalf.

  • learner.d365 Profile Picture
    learner.d365 35 on at
    RE: which event handler will I choose for update all the existing records of field values assign through event handler in d365f&o x++

    Actually this this is the full requirement

    Add a new field that is named MyInventLocationId to the InventTable table through extension. implement the logic of filling the new field through event handler.

    InventTable having Inventlocationid () method I need to call this method like as "InventTable.MyInventLocationId = InventTable.InventLocationId();

    I need to fill this myinventlocationId field by calling this method through event handler.

    If this possible please suggest me which event handler will I take

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: which event handler will I choose for update all the existing records of field values assign through event handler in d365f&o x++

    Event handler will be called whenever an event happens in the form like editing a record, updating a record, inserting record etc.

    If you want to update all records, you need to go for the runnable class which is formerly known as "Script".

    So, there is no event handler concept for your scenario.

    Thanks,

    Girish S.

  • learner.d365 Profile Picture
    learner.d365 35 on at
    RE: which event handler will I choose for update all the existing records of field values assign through event handler in d365f&o x++

    That runnable class I tried and it is working but in My task I need to this through event handler only. Is there any event handler available for this requirement.

  • Suggested answer
    Komi Siabi Profile Picture
    Komi Siabi 12,759 Most Valuable Professional on at
    RE: which event handler will I choose for update all the existing records of field values assign through event handler in d365f&o x++

    For existing records, you can create a Runnable class and use a while select to update the records.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans