37 lines
1.4 KiB
JSON
37 lines
1.4 KiB
JSON
{
|
|
"allOrNone": true,
|
|
"objects": [
|
|
{
|
|
"query": "SELECT Id, Pkey__c FROM Address WHERE CountryCode = 'NL' AND PKey__c != null",
|
|
"operation": "Readonly"
|
|
},{
|
|
"query": "SELECT Id, Name, VisitorAdressId FROM Location WHERE VisitorAddressId = null",
|
|
"operation": "Update",
|
|
"beforeUpdateAddons": [
|
|
{
|
|
"module": "core:RecordsTransform",
|
|
"description": "Updates VisitorAddressId with source Address.Id based on Pkey__c",
|
|
"args": {
|
|
"fields": [
|
|
{
|
|
"alias": "sourceAddressIdFromPkey",
|
|
"sourceObject": "Address",
|
|
"sourceField": "Id",
|
|
"lookupExpression": "source.PKey__c == target.Name",
|
|
"lookupSource": "source"
|
|
}
|
|
],
|
|
"transformations": [
|
|
{
|
|
"targetObject": "Location",
|
|
"targetField": "VisitorAddressId",
|
|
"formula": "formula.sourceAddressIdFromPkey"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"externalId": "Name"
|
|
}
|
|
]
|
|
} |