Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics RMS (Archived)

Change next Purchase Order Number in RMS

(0) ShareShare
ReportReport
Posted on by

I've tried to reset the next purchase order number in RMS using the below sql query.

DECLARE @NewPO NVARCHAR(20), @OldPO NVARCHAR(20)

SET @NewPO = 'NewPONumberHere'

SET @OldPO = 'OldPONumberHere'

UPDATE PurchaseOrder SET PONumber = @NewPO WHERE PONumber = @OldPO

AND @NewPO NOT IN (SELECT PONumber FROM PurchaseOrder)

this works in changing the current purchase order number but the next purchase order number reverts back to 10000000 and then I get a message that this number has been entered for another purchase order or inventory transfer. How do I get the next purchase order number to reset to something that hasn't been used before

Many thanks in advance

*This post is locked for comments

  • RE: Change next Purchase Order Number in RMS

    is this tested ??

  • RE: Change next Purchase Order Number in RMS

    SQL Express 2005 in test environment, SQL Server 2008 R2 in live environment

  • Suggested answer
    RE: Change next Purchase Order Number in RMS

    Which version of Sql Server are you running?

  • RE: Change next Purchase Order Number in RMS

    DBCC CHECKIDENT (PurchaseOrder, RESEED, 12345)

    I tried running this command on a test database (one that is not actually having a problem) and it did not change the next number to 12345 or 12346.  I also tried running the same command with the next number to be 0010000 which is a number I know we havn't used.

  • RE: Change next Purchase Order Number in RMS

    Looks like you know sql server pretty well.  You need to change the identity seed number in the master table for the PurchaseOrder table.  

    If your not sure how to do that.  This is the basic command.  DBCC CHECKIDENT (PurchaseOrder, RESEED, 12345)

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans