web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

try to update order entity's custom field called 'Tax flag' by workflow i got an error

(0) ShareShare
ReportReport
Posted on by 1,562

Hi,

When i try to update order entity's custom field called  'Tax flag' by workflow i got an error.

Dont understand its means,why its come anyone having idea,please share.

error is:

'Cannot obtain lock on resource:'SalesOrder_2220b845-01e6-e511-941e-005056a31f9c', mode:Update - stored procedure sp_getapplock returned error code -3.'

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot obtain lock on resource:'SalesOrder_2220b845-01e6-e511-941e-005056a31f9c', mode:Update - stored procedure sp_getapplock returned error code -3.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147204295</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Cannot obtain lock on resource:'SalesOrder_2220b845-01e6-e511-941e-005056a31f9c', mode:Update - stored procedure sp_getapplock returned error code -3.</Message>
<Timestamp>2016-03-09T14:15:00.1006937Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204295</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Cannot obtain lock on resource:'SalesOrder_2220b845-01e6-e511-941e-005056a31f9c', mode:Update - stored procedure sp_getapplock returned error code -3.</Message>
<Timestamp>2016-03-09T14:15:00.1006937Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
at Microsoft.Crm.Workflow.WorkflowContextBase.RetrievePrimaryEntity(EntityDependencyBase entityDependency)
at Microsoft.Crm.Workflow.WorkflowContextBase.RetrieveEntityInstances()
at Microsoft.Crm.Workflow.ActivityHost.StartWorkflowExecution(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context, Activity preLoadedActivity)

*This post is locked for comments

I have the same question (0)
  • Pranesh M Juwale Profile Picture
    1,196 on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    joshimandarblog.wordpress.com/.../transactions-in-dynamics-crm-and-waiting-for-resources-process-status

  • Tin Profile Picture
    1,562 on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    hey Pranesh ,

    I am not able to find  why i am getting this error.

    can you please send me the reason if you understand the issue.

  • Community Member Profile Picture
    on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    Can you please add a screenshot of you workflow.

    Also please validate that you are not trying to do an update after you have changed the status of the record to 'Inactive' ie that you are completing the order and then doing the update.

  • Tin Profile Picture
    1,562 on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    61336.1.JPG

    Hi Andey, please have a look :

    /cfs-file/__key/communityserver-discussions-components-files/117/61336.1.JPG

    This workflow  is triggered in order create event.

    And even i don't know what is going on here......please let me know if you want anything else. 

  • Community Member Profile Picture
    on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    Hi,

    That is the workflow job, what I would like is the design view of the workflow to see how it is configured.

    Thanks.

  • Community Member Profile Picture
    on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    Also to add a little context to this, are these orders being imported in batches or are they manually processed into the system?

    As the link that was posted earlier describes the issues is that when an action is being done in CRM , SQL will lock the record for that individual task on that record. What we need to see is this because of the number of records being processed at once, can we increase the levels of parallelism on the SQL server, can we make the workflow either sync/async to get around the issue.

    Does this occur all the time, or is this an isolated incident?

  • Tin Profile Picture
    1,562 on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    8551.1.JPG

    Its happen incidental not always....
    Please have a look in snap,that will give yo better idea...

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: try to update order entity's custom field called 'Tax flag' by workflow i got an error

    The lock will be because something else is accessing the record when the update i trying to fire. Have you tried setting this as a sync workflow (real time) so that it makes the update as an extension of the create event rather than later giving rise to conflicts?

    The other question for you to check out is what other workflows/plugins do you have firing off at the create/update of this entity. Have you tried deactivating any of them to see if it is a conflict there?

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans