0

We have an asset object that has a child asset attached to it. We have a Process Flow that updates the AccountID and State of the child asset if the parent asset is changed (so the parent and child asset always have the same AcocuntID and State).

I'm truing to use simplesalesforce api to update the parent Asset AccountID and State using

sf.Asset.update(AssetId, { 'AccountId': AccountId, 'State': 'Shipped' })

This always fails with:

[{'message': 'The record couldn’t be saved because it failed to trigger a flow. Contact your administrator for help.', 'errorCode': 'CANNOT_EXECUTE_FLOW_TRIGGER', 'fields': []}]

If I disable the process flow it works.

  • 1
    who ever has last saved/activated the process flow, will receive an email giving more information about error. the error message you posted in question doesn't tell what's happening – night crawler Feb 16 '17 at 22:40
  • I get no email at all. I tried explicitly breaking the flow so updating through the web ui causes a failure and then i got the email. With the current flow, updating over the web UI works fine. – Corby Feb 16 '17 at 22:46
  • are you sure the email you got is for the one broke intentionally? because it takes some time to generate an email when a flow is broken, at least in my org. – night crawler Feb 16 '17 at 22:49
  • Yes, I get no email at all. – Corby Feb 16 '17 at 22:51
  • well, without the error its difficult to identify the underlying issue. At least you need to add screenshots of what's happening inside the process flow – night crawler Feb 16 '17 at 22:59
0

The problem was the API version setting in simplesalesforce. By default it sets the API version to '29.0'.

Once I set the version to '39.0' it worked fine. So when you create the Salesforce object just pass version = '39.0' to the Salesforce() initializer along with the login tokens.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.