You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation and testing in the repo show Update() in the context of creating an empty object, using Create() to push it to Salesforce, then updating it. If you're working with already-existing objects (Contact, in my case), this does not work.
The following code:
contactObj := client.SObject("Contact").Get(contactID) // Pulls ALL the information on this Contact, as expected.
contactObj.Set("Email", newContactEmail) // Updates the email field, as expected.
contactObj.Update()
This returns a 400 from Salesforce, seemingly due to ALL the fields being passed. Guessing it might be related to #9 and/or #10, where more fields need to be omitted for Contact?
Was able to work-around it by creating an empty object, setting the ID and just the updated fields and running it:
Not sure if it's just a matter of omitting some extra fields (Salesforce doesn't return much info on 400 other than it failed) or if Update() needs some tweaking (in general or Contact-specific).
The text was updated successfully, but these errors were encountered:
The documentation and testing in the repo show
Update()
in the context of creating an empty object, usingCreate()
to push it to Salesforce, then updating it. If you're working with already-existing objects (Contact, in my case), this does not work.The following code:
This returns a 400 from Salesforce, seemingly due to ALL the fields being passed. Guessing it might be related to #9 and/or #10, where more fields need to be omitted for Contact?
Was able to work-around it by creating an empty object, setting the ID and just the updated fields and running it:
Not sure if it's just a matter of omitting some extra fields (Salesforce doesn't return much info on 400 other than it failed) or if
Update()
needs some tweaking (in general or Contact-specific).The text was updated successfully, but these errors were encountered: