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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to assign version numbers to the existing records and also increment version number?

(0) ShareShare
ReportReport
Posted on by 204
Hi,
My requirement is in quality order, based on item number and batch the version numbers to be inserted and also increment the version number, if new quality order is created for same item number and Batch number. How can we achieve this. 

For ex: If there is item : item001 with Batch : Bat001, With same item and Batch, if there are 3 existing Quality order: Q001, Q002 and Q003,
1)How can we insert version 0, version 1, version 2 respectively to the quality order and
2) in case a new quality order Q004 is created, then version number to be updated as Version 3.
Quality order idItem idBatchVersion no
Q001item001Bat0010
Q002item001Bat0011
Q003item001Bat0012
Q004item001Bat0013
 
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,

    To assign version numbers to existing records and increment the version number, you can follow these steps:

    1. Create a new field in your Quality Order entity to store the version number. Let's call it "VersionNumber".

    2. In the Quality Order form, add a logic that retrieves the maximum version number for the same item number and batch combination. This can be done using X++ code or workflows.

    3. When creating a new quality order, set the "VersionNumber" field to the maximum version number retrieved in step 2 plus 1.

    4. Save the quality order with the assigned version number.

    Best regards,
    Kevin
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    I could not get the correct understanding. Can you please give more detail on requirement?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 445 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 309 Super User 2026 Season 2

#3
CU29091230-0 Profile Picture

CU29091230-0 192

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans