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.
| Name | Type | Description |
|---|---|---|
object | string | The name of the object to save or update. |
saveParams | string | Specifies 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. |
callback | function | JavaScript method executed when the API method call is completed. |
| Name | Type | Description |
|---|---|---|
result | boolean | true if saving or updating the object was successful, false if saving or updating the object wasn’t successful. |
id | string | The Id of the newly created object. |
error | string | If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message. |