Wednesday 4 July 2018

Create number sequence in D365

Today I will be discussing about how to create custom number sequence in D365. Number sequence framework in 2012 and AX7 is quite similar . In AX 2012 we can customize existing classes like NumberSeqApplicationModule but in AX7 we need to extend those classes in order to work on its different methods.
Scenario : Let' s say whenever we place a order for any item we need to generate a unique and sequential order id for it. So for this purpose I will be using number sequence framework.
Below are the steps which are required to be followed for creating number sequence.

1. Created a new project with name Order Management Number Sequence










2. Create a new EDT. Right click on your project, add new item, Select EDT String and give it name as “OrderNumberId”.

























3. Create a new class NumberSequenceModuleProcureAndSourcing and extend it with NumberSeqApplicationModule. Override/Add following methods in it.

a) initializeReference









b) loadModule











c) numberSeqModule








d) buildModulesMapSubscriber





e) numRefOrderNumberId






4. Create a new job and add below mentioned code in it. I have created a new class namely OrderIdNumberSequence and executed it by setting as startup object.









After running job below is its output








5. Run the wizard by using following navigation – Organizational administration -> Common Forms -> Number Sequences-> Number Sequences-> Generate -> Run the wizard

6. Create a job and add below mentioned code in it. It will generate a new number sequence.
Note:  I have used previously created job.











7. Build project and execute the job.

Final output : New number sequence for order id created successfully






4 comments:

  1. I followed the same steps but while generating the NumberSequence I am getting 'Trying to use unsupported country or region code RU, localized functionality for it is disabled'.
    I am not sure to proceed ahead or not.

    Please guide me.

    ReplyDelete
  2. Hi... check the country region code is available on address setup first. Go to -> Organization administration -> Global address book -> Addresses -> Address setup

    ReplyDelete
  3. Microsoft Helpline Number is totally free for customers +1-844-728-4045 who are having problem with their Microsoft Office, Outlook, Windows or any other kinds of software’s

    Toll-free:- +1-844-728-4045
    Email – support@wconferenceweb.com
    Website: - https://microsoft.wconferenceweb.com

    ReplyDelete
  4. Wonderful i successfully completed the task .. Number Sequence Generated successfully ..
    if some one having issue can contact with me{ +923424805457 Whatsapp}
    or { irfansial262 .. skype }

    ReplyDelete

Note: only a member of this blog may post a comment.

Connect and upload in azure blob with azure key vault using x++

 Today, I will be sharing details about file upload in azure blob using azure vault that includes pre requisite and code snippet used to it....