How to Auto Number Entities in Dynamics CRM
This will work for any entity – custom or out-of-the-box. All that is involved is 1) creating an auto number entity and record, 2) creating a relationship with the entity you would like to have an auto number in, and 3) making a real-time workflow populate and increment the number.
Here are the steps to go through. You will end up with an automatically-generated number with an optional prefix and suffix on the first save of the record. I added the ability to increment your auto number by any whole number in the event that you have that requirement.
1. Create & save your solution:

2. Add the entities you would like to add the auto number functionality to.
In this case I am going to create the ability to auto number Accounts, Quotes, and a custom entity I created called Projects.

3. Create a new entity called AutoNumber.

4. Add the following fields to the AutoNumber form for each entity you would like to have auto numbering.
- Prefix (Text)
- Suffix (Text)
- Number (Whole Number, Simple)
- Increment (Whole Number, Simple)

5. Create a 1:N relationship between your AutoNumber entity and the entity(ies) you would like to have the auto number functionality apply to.

6. Create your AutoNumber form:
Create a section for each entity you would like to auto number.

7. Add a text field to each of the entities you would like to auto number.
This will store the generated number. In this case I have called mine Account Number.

8. Create the AutoNumber record with the default values in it.
- Go to advanced find
- In “look for” select AutoNumbers
- Click results
- Click New AutoNumber
- Enter in your values

9. Now create the workflow to set and update the AutoNumber (one for each entity).

10. Create a step to update the quote and set the Quote AutoNumber lookup to the value of the record you created (Defaults).

11. Update the value to your quote number field on the quote form using the AutoNumber values:

12. Increment the Quote AutoNumber number field by the amount in the quote increment field

13. Leaving you with a Workflow looking like this Repeat it for each entity you would like to Auto number.

Now create some records and you should have some automatically generated numbers!
posted on 2021-07-13 14:53 lingdanglfw 阅读(30) 评论(0) 编辑 收藏 举报
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?