2

We are running into the object lock contention UNABLE_TO_LOCK_ROW error when attempting to create a record in the CampaignMember object using AMPscript in Marketing Cloud due to the high lock contention on the CampaignMember object. This isn't a Marketing Cloud specific issue, so I'm not tagging it as one.

Does anyone know if there is an API method that I can use to check the lock status of an object? I was thinking that I could wait until the CampaignMember object becomes unlocked before creating my record...

  • I couldn't find a direct way to identify that if record is being locked for the transaction. However I can suggest alternate solutions, if you can describe the use case with more details. – Salesforcesmarty Mar 6 '17 at 0:03
  • If you refer to my original question, I'm using the CreateSalesforceObject() AMPscript function to create a record (which is essentially just a wrapper for the Sales Cloud API). These records are being created at send time and throttling the sends is not an option for us (as it would take days to send an email to a large list). We could create the records after sending emails though, although that's not ideal. – Eliot Harper Mar 6 '17 at 0:07
  • 1
    So if I am understanding it correctly, you are sending emails to a list or DE and have put the AMPScript in the EMAIL template to create a campaign member record for the contact/lead. I reckon, setup a journey for sending email and then for each successful email, insert a record to Campaign member object. – Salesforcesmarty Mar 6 '17 at 0:25
  • Hmm, that could be another option too. – Eliot Harper Mar 6 '17 at 1:37
  • 1
    Thanks Daniel, it's less than 2,000 so I don't think its related to a Lookup Skew — I think the issue is that the CampaignMember object has a high risk of lock contention so I'll just have to be content with that for now :-) – Eliot Harper Mar 6 '17 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.