Order is edited by multiple users Error

In my current project we have integrated order with our financial system and also we are using third party tool to generate order line items. After some time in production we started getting issue “Order is edited by multiple users” , and we were getting this issue only some times. After doing lot’s of testing what I found my order update plugin is called multiple times. After doing lot’s debugging what I found in my plugin context.depth is 1 but ever time correlationId was different. So I solved this issue by including below code in my plugin

if (_CorrelationID == Guid.Empty)
_CorrelationID = Context.CorrelationId;
else
{
if (_CorrelationID != Context.CorrelationId)
return;
}
try
{
// rest of the code
}
catch()
{//handle exception}
finally
{
_CorrelationID= Guid.Empty;}
This piece of code fixed my issue

4 thoughts on “Order is edited by multiple users Error

  1. Kirsh

    Hi Mahendrapal,

    I am same infinte loop error for plug-in update.Can you please let me know where to use this above code

    Thanks,
    Kirsh

    Reply
      1. Kirsh

        Hi Mahenderpal,

        Thanks for you fast response.But I am still getting the same issue and assume each time the correlationId is initialzed the value is empty and thus causing infiniteloop.

        Thanks
        Kirsh

        Reply

Leave a Reply to Kirsh Cancel reply

Your email address will not be published. Required fields are marked *