address, paren location & child location logic finished
This commit is contained in:
33
prepared_steps/4/export.json
Normal file
33
prepared_steps/4/export.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user