I have custom workflow execute when record creates. The WF doing following operation:
1) Read the attribute i.e availability
2) Calculation -> new availability = availability - quantity
3) Update availability
Above functionalities perfectly working (get updated availability) when I create a new record through CRM front browser.
However, I have external REST API which creates multiple records at the same time. Then I am getting wrong availability due to concurrency issue.
I have tried with lock (SyncLock) but sees it doesn't work. Is there any way to lock the code piece in CRM to handle the concurrency?
*This post is locked for comments