自动生成编码规则

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.

Step 1) Created a new project with name Order Management Number Sequence

1

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

2

3

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

  1. initializeReference4a
  2. loadModule4b
  3. numberSeqModule4c
  4. buildModulesMapSubscriber4d
  5. numRefOrderNumberId4e

Step 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.

5

After running job below is its output

6

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

Step 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

Step 7) Build project and execute the job.

Final output : New number sequence for order id created successfully

8

转自:https://mahajamalidynamicsaxblogs.wordpress.com/2017/12/12/d365-how-to-create-number-sequence/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值