Microsoft Dynamics 365 Blog

When you have a number sequence that is set to continuous and the number that pulls into the form is 000000 and is not a valid number.

This is caused by the Stored Procedure not getting updated when the R2 in place upgrade process is complete.  We suspect that this problem may be due to incorrect steps done during the upgrade that we are not able to reproduce.

This blog describes the steps on how to copy the stored procedure from a working environment to resolve the issue with the no value pulling from the number sequence table.

To copy out the stored procedure from a working data base you will use the following steps. 

  1. Open SQL Server Management Studio
  2. Log in
  3. Expand Databases
  4. Select MicrosoftDynamicsAX or whatever you have it named and expand
  5. Expand Programmability
  6. Expand Stored Procedures
  7. Right Click on dbo. getNumInternal
  8. Click Modify

 9. Select all and Copy the code

Now in the non-working data base you will do the same steps but you will paste the code into the stored procedure.  You will need to change the top line to use the database name that is not working. 

Then you can execute the code by clicking the Execute button.  

Please make sure you have a backup of your data base before you try these steps.  You will need to restart the AOS and AX after you have run this code.

If you are still having an issue with the Number Sequences not advancing you will then want to check the permissions on the stored procedure.

Here are also the steps to do this:

  1. Log in to SQL Server Management Studio.  You can go to Start | All Programs | access your SQL application and open SQL Server Management Studio.
  2. Log in to the SQL Server being used.
  3. Expand Databases.
  4. Expand MicrosoftDynamicsAX or the AX database being used.
  5. Expand Programmability.
  6. Expand Stored Procedures.
  7. Find getNumInternal and right click to open Properties.

   8. Select Permissions and check the permission setup for the user.

Test adding the user that is currently logged on to the list and ensure that the Execute option has Grant marked

Go back to Microsoft Dynamics AX and test that the number sequence is now working.

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!