Salesforce: Commonly Returned Errors

Below is a list of common errors experienced between the Formstack forms and Salesforce API. Here you can reference frequently encountered errors and the suggested corrective action.  Some errors are dependent on your Salesforce Account and configuration so additional troubleshooting in the Salesforce Account may be necessary.

 

1. INVALID_LOGIN: Invalid username, password, security token; or user locked out  

  • The Username, Password, and/or Security Token that were entered into the Form settings may not be correct. When entering your Salesforce credentials into the Form integration, you will want to be sure you enter your username in the first entry box, your password in the second entry box and then finally your Security Token in the third and final entry box.  

  • Before trying this in the Form integration, you may want to verify your credentials with Salesforce to be sure your information is correct and that your account is active.

  • If you are using Salesforce SandBox Account Credentials, confirm that the integration is in TEST Mode vs. ON Mode. If you are not using SandBox credentials, the integration will need to be in ON Mode to recognize the Account.

  • You also must first add an object to the integration in order to move Salesforce into ON mode. If you're certain of your credentials, place the integration in OFF mode and refresh your object list. Add your first object and all required fields. You should then be able to move the integration into ON mode.

  • Salesforce and APIs cannot communicate when using the Salesforce Enterprise plans unless they utilize the Salesforce Partner API.

 

2. Required fields are missing

  • Once you have added the Salesforce integration to a Form, you may notice that some Field mappings are notated with an "asterisk", this means the field is Required by Salesforce. If a field is Required by Salesforce, then it must be mapped and populated with an answer when the Form is submitted.  If not, Salesforce will return this error.

  • If the Field in question is hidden by Logic, Salesforce will not recognize the Form Logic and still require something to be entered into the field. In this case, you will either want to set the Field to not be hidden by Logic and make it Required on the Form so all submitters are entering data or map the Salesforce Object to another Field on the Form that is visible and required for all users to complete before submitting.

 

3. CSN Only Users cannot have a user role

  • Currently, "CSN Only Users" are listed as Salesforce Chatter Users. This error is generating from Salesforce and is likely due to the User being assigned/used is setup for Chatter-use only. The first thing to do is to confirm the User settings in Salesforce to be sure they do not have any restrictions or limited access outside of the Salesforce Chatter feature.

 

4. Record Type ID: This ID value isn't valid

  • First, you'll want to confirm that the Record Type is active in your Salesforce Account and active on the Object Page Layout as well.

  • Another common cause of this error is that the Form is not passing a full or valid Object ID number.  So, you will also want to confirm that the Salesforce Record type ID being entered into and passed by the Form is correct.  This can be confirmed by copying the type ID from the URL bar on the page of that Record type.  Once you have that Record ID, use this when filling out the Form to ensure the most current version of the ID is being passed to Salesforce.

 

5. Attempted to add an item where either the item id is 'null' or the item id '123A00000001xXx' is null

  • This could mean a few things depending on how your Salesforce Account and Fields are setup.  Some of these items include the inserted data already exists in Salesforce, there are upgraded versions of the Salesforce Data Loaders and/or the referenced external ID is not associating with a record.

  • Unfortunately, the Salesforce API does not point to the exact null value in these errors so the first thing to do is check with the folks at Salesforce so they can drill into your Account and check the API key and also provide some additional information on the null value source.

 

6. Data value too large (max length=50)

  • The receiving field in Salesforce has been set with a maximum field limit, in this example 50 characters.  If the Submitter enters text or chooses an answer longer than 50 Characters, then Salesforce will reject the field and Submission.

  • To correct this, we recommend: 1) Adjust the field in Salesforce to accept more than 50 characters and/or 2) Place a maximum character count for the Form Field to prevent Users from even submitting the Form if the character count is beyond the established Salesforce limit.

 

7. ' is not valid for type xsd:boolean, should be '0', '1', 'true' or 'false'

  • To correct this, we recommend checking which of the Salesforce fields are Boolean, as you will likely need to change the value for any Formstack fields that are mapped to Boolean Salesforce fields.

 

8. ID in upsert is not valid

  • If you are upserting a Field by a Salesforce Field ID, the error you are receiving indicates that the Value may not exist or the entire number may not have been entered on the Form as Salesforce cannot locate the item using the listed ID number.

  • First, verify that the entered ID number on the Form is current and active in the Salesforce Account.  Also, confirm that the entire number has been entered on the Form - if these numbers do not match, Salesforce will reject the Submission and return this error.

 

9. Field disappears when trying to map and we see a "Failed' error in red when attempting to map

  • The integration is removing the newly added Objects due to the integration settings being too large to save to the database. Once this limit has been reached, additional Objects and fields cannot be mapped which is why these options were not retaining after being added to the Form.

  • The limits on the data mapping is dependent on the Objects and fields so there isn’t a hard limit on this but once that limit has been met, there is not a way to add more fields or objects beyond this. If some of the existing objects are removed, then more space will be made to add additional objects.  Another option would be to create a second Form which the user can fill out and submit after the first Form. The second Form will be mapped to Salesforce as well so data from both Forms would be sent to Salesforce but the Object load would be split between the two Forms.

 

10. An invalid XML character (Unicode: 0x3) was found in the element content of the document

  • The invalid XML error can indicate that there was a character in the entry with an invalid XML encoding which was inserted into one of the Fields. We see this most often when Submitters copy-and-paste one or several of their answer responses into the Form Fields. The data that they paste into the fields likely contains invalid XML characters which Salesforce rejects along with the Form Submission.

  • To submit without receiving this error, Users will want to enter their text into the fields without copying and pasting OR paste their text into a program (such as NotePad) which will strip the text for encoding and then copy this from the program and paste into the Form Fields.

 

11. The users password has expired, you must call SetPassword before attempting any other API operations

  • Depending on your Salesforce Account setup, your passwords may expire after a certain amount of time.  This can be resolved by updating the Form with the new password data in Form's Salesforce settings. Once you have changed that setting, change your password and re-authenticate the integration with your new password in Formstack.

 

12. ERROR: There was an error creating Attachment 1. Salesforce error: Required fields are missing: [Name, Body]

  • This error occurs when upload fields are on form but not required and the Salesforce integration is set up to accept uploads. Salesforce upload fields require the Name and Body so even though the upload is not required on the form it is required on the integration causing this error.

  • The information does still get to Salesforce but it will not appear on Formstack submissions.

  • To avoid this issue we recommend making upload fields going to Salesforce required on the form.

Was this article helpful?
1 out of 12 found this helpful

Comments

0 comments

Please sign in to leave a comment.