saveLog() for Salesforce Classic

Saves or updates an object in Salesforce.

If an object uses recordType, pass the recordTypeId in the saveLog call. If you don’t pass the recordType, the record is created using the default recordType for the profile. For person accounts, you can’t pass the person account recordType if the profile’s default is to a business account.

NameTypeDescription
objectstringThe name of the object to save or update.
saveParamsstringSpecifies the fields to save or update on the object.If the object’s ID is specified, a record is updated. For example: Id=001D000000J6qIX&Name=Acme&Phone=4154561515. If the object’s ID isn’t specified, a new record is created. For example: Name=Acme&Phone=4154561515.
callbackfunctionJavaScript method executed when the API method call is completed.
NameTypeDescription
resultbooleantrue if saving or updating the object was successful, false if saving or updating the object wasn’t successful.
idstringThe Id of the newly created object.
errorstringIf the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.