08-02-2020 11:52 PM - edited 08-03-2021 09:22 AM
Some organizations set up their Salesforce users to not use a Security Token. This is done by setting an acceptable range of IP addresses instead in Salesforce Admin. This article will walk you through how to modify the Salesforce Output tool so that it may be used without a Salesforce Security Token.
Without the work-around users are able to sign in on the GUI of the tool without a token successfully:
However when running the workflow they will receive error Parse at char(0): Type mismatch in operator +.(Expression #3)
The Salesforce Input tools (both the Deprecated version and Python-based 4.x versions) do not encounter an issue running locally without a Salesforce Security Token.
If you encounter any issues or have questions on the above, please contact Alteryx Support.
I'm doing this alterations, but I could use a conditional formula to use Token's access if it isn't null?
Also, when I upload the flow to Gallery without Token (it also happens in Salesforce Input Tool) it comes a authentication error, something about cryptography method is not supported.
if
!isNull([security_token]) then
'<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<n1:login xmlns:n1="urn:partner.soap.sforce.com">
<n1:username>' + [username] + '</n1:username>
<n1:password>' + [password] + [security_token] + '</n1:password>
</n1:login>
</env:Body>
</env:Envelope>'
else
'<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<n1:login xmlns:n1="urn:partner.soap.sforce.com">
<n1:username>' + [username] + '</n1:username>
<n1:password>' + [password] + '</n1:password>
</n1:login>
</env:Body>
</env:Envelope>'
endif