new upsert(logical, sObject, externalId, attrs, state) → {Operation}
Upsert if conditions are met.
Parameters:
Name | Type | Description |
---|---|---|
logical |
boolean | a logical statement that will be evaluated. |
sObject |
String | API name of the sObject. |
externalId |
String | ID. |
attrs |
Object | Field attributes for the new object. |
state |
State | Runtime state. |
- Source:
Returns:
- Type
- Operation
Example
upsertIf(true, 'obj_name', 'ext_id', {
attr1: "foo",
attr2: "bar"
})