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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How do I update multiple groups of records in a temp table?

(0) ShareShare
ReportReport
Posted on by 180

In the example below I want to loop through all records and set the updateID to a numeric value of 1 for group A, 2 for group B, etc.. Not sure how to accomplish this in X++? Thanks for any help.

SalesID Group UpdateId
123 A
124 A
125 B
126 B

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ajit Profile Picture
    8,755 on at
    RE: How do I update multiple groups of records in a temp table?

    It has to be run time as you are talking about run time and you can use while select and use sales id in where clause if you have update id per sales id.

  • LBP Profile Picture
    180 on at
    RE: How do I update multiple groups of records in a temp table?

    Yes, during runtime. I want to update based on group. So group A, updateId = 1, group B update = 2, etc.. How do i increment the UpdateId number?

    SalesID Group UpdateId
    123 A 1
    124 A 1
    125 B 2
    126 B 2
  • LBP Profile Picture
    180 on at
    RE: How do I update multiple groups of records in a temp table?

    Thanks for the help. I would not know how many as it could be a large number of Groups, SalesIds.

  • Verified answer
    LBP Profile Picture
    180 on at
    RE: How do I update multiple groups of records in a temp table?

    I have ended up grouping by group into a temp table then updating the main table with the while select. Thanks for the help.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans