Hi Below is what I tried but every time CRM is creating multiple records with duplicate numbers:
1st Way:
1. Keep counter on a separate entity record.
2. Update the lookup of counter record on the main record.
3. Increment the counter by 1.
4. Update the new number on main record.
5. Stop.
2nd Way:
1. Keep counter on a separate entity record.
2. Update the lookup of counter record on the main record.
3. Update the new number on main record.
4. Increment the counter by 1.
5. Stop.
I have also tried to do it through code and making a false update on counter record so that CRM can apply the lock until the activity is complete. But again, it creates records with duplicate numbers. Can anyone help me out here?