Skip to main content

Notifications

Announcements

No record found.

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 158
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
 
  • Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,617 Super User 2024 Season 1 on at
    How to assign version numbers to the existing records and also increment version number?
    I could not get the correct understanding. Can you please give more detail on requirement?
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    How to assign version numbers to the existing records and also increment version number?
    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

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,419 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,492 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans