Hello d365 Community,
I have a value that I want to copy it to the next record. It's basically a number that will be incremented by 1.
For example, user will enter 2001 in Ticket # field, save and close. The next record value in Ticket # will be 2002 ( pre-populated). This number can start with 4 digit or 5, it's not fixed, otherwise I would have used Auto-numbering.
Hello Wahaj,
I am using Celedon Auto Number Plugin. It works fine for the first record. However, when I try to create 2nd record for the same entity and same field, it's giving me a "Duplicate AutoNumber record exists" error.
Hi Emanuel,
You can use flow to achieve it, which don’t need any code.
1.set ‘when a record is created’ as trigger.
2.Add ‘List records’ action to list one most recent record(not just created) to get ticket.
3.Add ‘condition’ to check the ticket field is null or not.
4.If the ticket field of the latest record has value, add 1 and update the new record with it.
In 'Yes' Branch, add 'compose' action and 'Update a record' action.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Hi,
Thank you for your query.
One Idea is to use Autonumber but update its seed using API. That means, once user enters the value, use API (via flow or plugin) to update the seed.
You can update seed as per below instructions:
If above solution is not ideal for you, you have to implement this logic using a Plugin.
Here is the high level plugin logic:
Let me know if you need more clarification.
Best.
Wahaj
(if it helps, mark it as verified)
Adis
136
Super User 2025 Season 1
Sohail Ahmed
81
Jonas "Jones" Melgaard
77
Super User 2025 Season 1