You need to sign in to do that
Don't have an account?

Sales Force Update object Failed: attempt to violate hierarchy constraints
Hi all.
We have a PHP web app talking to SF. We have converted a Lead to an Account, and are then trying to update the account and getting the error when playing in the sandbox:
Sales Force Update object Failed: attempt to violate hierarchy constraints
Unfortunately, there's no documentation on this error anywhere, and it seems like we're the only ones getting it.
Can anyone shed some light on what this means? The same code works fine when talking to the live SalesForce.
Thanks
Todd
Hey Todd, did you have any success with this. If so can you please share your thoughts. I saw this error today and I'm lost as what could have lead to this.
Is it possible that the ID's are different in your Sandbox environment? I believe that they are, but I could totally be off base with this and wrong
It sounds like you're trying to create a circular account hierarchy, and that's not allows (e.g. account 1's parent is account 2, account 2 parent is account 3, and then trying to set account 3 parent to be account 1).
I can confirm (having run into this error today):
You'll get the error
I imagine this is true for any SObject and in DML insert, update, and upsert operations