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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

Change Number Sequence Through OData Getting Weird Error

(0) ShareShare
ReportReport
Posted on by

Hello, 

For Finance and Operations, we at our company are using an in-house-made .NET application to insert and update project records through FandO Odata interface. 

Projects insert fine, however we are recently facing some problem related to the update of number Sequence. 

We didn't have this problem before. And this new issue Only happens in Prod environment, not in the Dev environment (i.e. in Dev the number sequence can be updated smoothly). 

But recently, when we want to update the number sequence for Proj_702 (one corresponding to Project ID), we are getting the following error:

Header: error: StatusCode: 400, ReasonPhrase: 'Bad Request'

Contents: 

"error":{
"code":"","message":"An error has occurred.","innererror":{
"message":"Write failed for table row of type 'NumberSequenceTableEntity'. Infolog: Error: It is not possible to alter the next value of a number sequence policy via import once that number sequence policy is in use.","type":"Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataWriteException","stacktrace":" at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.UpdateEntity_Save(ChangeOperationContext context, ChangeInfo changeInfo)\r\n at

Please give some advise on how to resolve this. 

Thanks very much,

Kay

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    299,576 Super User 2025 Season 2 on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Hi Kay,

    Do you have the continuous option enabled on the number sequence in Dynamics 365? If so, this might be the reason that a number could be in use.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Hi,

    Can you check if in the number sequence "In Use" field is marked in Dev environment as well? Looks like that is causing the error for you in Prod.

  • Suggested answer
    Ramit Paul Profile Picture
    22,797 Most Valuable Professional on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Hi, if your sequence is 'in use" it can prevent you.

  • Community Member Profile Picture
    on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Thanks Ramit!

    That may be the issue as it is not turned on in the dev environment.  

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Thanks very much Gunjan!

    That may be the issue as it is not turned on in the dev environment.  

  • Community Member Profile Picture
    on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Thanks André,

    We did check the "Continuous" option, it is disabled.

  • Community Member Profile Picture
    on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Thanks again for your reply, I think that may exactly be the problem.

    But I have a follow-up question:

    What is this "In Use" for? And how can I turn it off?

    Thanks a lot!!

    Kay

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Hi,

    This is the code causing issues for you. Please turn off the "In Use" field and it should work fine -

    pastedimage1600875617921v1.png

  • Gunjan Bhattachayya Profile Picture
    35,423 on at
    RE: Change Number Sequence Through OData Getting Weird Error

    In use signifies that the number sequence has been associated with a record type.

    Please check this link for more information regarding Number sequences.

  • Suggested answer
    Ramit Paul Profile Picture
    22,797 Most Valuable Professional on at
    RE: Change Number Sequence Through OData Getting Weird Error

    Yes, like we mentioned, 'IN use' means that number sequence is in use, and that can not be turned off  from UI ( at least I am not aware)

    Like Gunjan shared the code, you can try

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,922

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,922

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 835 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans