You need to sign in to do that
Don't have an account?
Puneeth Kumar
Will External API calls invoke Workflows/Approval process in salesforce?
External system(SharePoint) is making SOAP API call to create a record in salesforce, on which creation of records upon meeting a field criteria a workflow should be triggered in updating field values. When a record is created through Salesforce UI the workflow runs fine but when it is getting created through API call seems like workflow is not running.
So is it something like we cannot invoke Workflow/Aprroval process in sfdc through external API call? If so what thinigs should be done to trigger Workflow/approval process through external SOAP API calls?
So is it something like we cannot invoke Workflow/Aprroval process in sfdc through external API call? If so what thinigs should be done to trigger Workflow/approval process through external SOAP API calls?
In my instance, Sharepoint(UI) is saving a record with field name "Payment option= Company addresss" then the record's address should be updated with company's address. They tried saving the record with API by same Payment option field value but the address fields are not getting filled in record (Workflow already in salesforce with actions of updating address field), where as if I do it in Salesforce UI the workflow works perfectly fine.
What can be the best solution for this? please advice.
You have to check your workflow enter crietia and filter criteria to see what are data differences that are causing workflow to not fire.
Yes, the API calls to salesforce will invoke the Workflow rules / triggers automatically. But this also depends on the User you are performing the action with. Say if your user who you are logged in does not have a permission (Field level security) to the "Payment Option" field, in that case since Workflow rule's criteria can not be checked, so the Workflow rule will not fire. Workflow rules execute in the context of the logged in user while Triggers execute in System context.
Best way to debug this would be check Salesforce debug logs and check which Workflows were invoked due to the action.
Thanks
Anupam Bansal
OSI Consulting
Payment option is a picklist value, API is passing one of the picklist value called 'Company address', but in workflow configuration screenshot that you posted "Payment Option" is being compared with value "Pay To company". I think this explains why your workflow rule is not working from API call.