Notifications
Announcements
No record found.
Hi,
I have different combinations of values of 2 fields(OEM,Subgrp). For each combination, I want ID in Autoincrement mode. So each combination will start with 001. And then increment based on same condition. How this can be achieved?
For ex. screenshot shown in excel:
Regards,
nanu
You should write plugin on pre operation on create message. In plugin code check existing record auto number value order by modified on desc to take latest record. And increase the vaue by 1.
You need to make sure to implement locking mechanism to not create duplicate auto number.
see below article on how to implement lock in plugin
xrmdynamicscrm.wordpress.com/.../
Have you tried Celedon Autonumber solution? it provides options to generate condition based autonumber.
celedonpartners.com/.../
Let me know if you need more help.
Hi partner,
Are you using D365 online or OP.
For D365 online, we could use power automate to do it, which is no code way.
Hi Bipin,
I'm new to this.. Can you please give me any link which helps to write plugin.
Hi Karunakaran,
Does this solution supports condition based on combination of field values?
For example
Column1 Column2 IDField
A B 001
A C 001
A B 002
B C 001
Hi Lu Hao,
I tried this solution. It is not showing product entity.
HI,
To implement lock check below article.
Basic plugin code is already available under SDK folder SDK\SampleCode\CS\Plug-ins
Check AccountNumberPlugin sample code under plug-ins folder in SDK
Download SKD Link - www.microsoft.com/.../details.aspx
If you are going to specify the both the Column values in a transactional form and system should generate the next sequence # for that unique combo, then plugin is the best option. You need to maintain a setup entity which contains (column1 lookup, column2 lookup, autonumber length, next number, prefix, suffix, etc.). Plugin should execute synchronous on target record create.
Flow is also an alternative if you are using CRM online, but it executes Asynchronously, and Users might not prefer it for such solution.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 96 Super User 2025 Season 2
Jimmy Passeti 50 Most Valuable Professional
Gerardo RenterÃa Ga... 49 Most Valuable Professional