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