first draft update account
This commit is contained in:
72
prepared_steps/8_update_personaccounts/export.json
Normal file
72
prepared_steps/8_update_personaccounts/export.json
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"allOrNone": true,
|
||||
"objects": [
|
||||
{
|
||||
"query": "SELECT Id, SobjectType from recordtype where SobjectType = 'Account' and Name = 'Person'",
|
||||
"operation": "Readonly",
|
||||
"master": false
|
||||
},{
|
||||
"query": "SELECT Id, BillingHouseNo__c,BillingStreet__c, BillingCountry__c,BillingPostalCode__c FROM Account WHERE isPersonAccount = true and BillingCountry__c = 'NL' AND RecordTypeId = '01220000000E59RAAS'",
|
||||
"operation": "Update",
|
||||
"master": true,
|
||||
"beforeUpdateAddons": [
|
||||
{
|
||||
"module": "core:RecordsTransform",
|
||||
"description": "Updates RecordTypeId with source .Id based on Pkey__c",
|
||||
"args": {
|
||||
"fields": [
|
||||
{
|
||||
"alias": "sourceRecordTypeId",
|
||||
"sourceObject": "recordtype",
|
||||
"sourceField": "Id",
|
||||
"lookupExpression": "source.Name == 'Person'"
|
||||
},{
|
||||
"alias": "sourceAddressCountryForFSL",
|
||||
"sourceObject": "Account",
|
||||
"sourceField": "BillingCountry__c",
|
||||
"lookupExpression": "source.Id == target.Id"
|
||||
},{
|
||||
"alias": "sourceAddressStreetForFSL",
|
||||
"sourceObject": "Account",
|
||||
"sourceField": "BillingStreet__c",
|
||||
"lookupExpression": "source.Id == target.Id"
|
||||
},{
|
||||
"alias": "sourceAddressHouseNoForFSL",
|
||||
"sourceObject": "Account",
|
||||
"sourceField": "BillingHouseNo__c",
|
||||
"lookupExpression": "source.Id == target.Id"
|
||||
},{
|
||||
"alias": "sourceAddressPostalCodeForFSL",
|
||||
"sourceObject": "Account",
|
||||
"sourceField": "BillingPostalCode__c",
|
||||
"lookupExpression": "source.Id == target.Id"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{
|
||||
"targetObject": "Account",
|
||||
"targetField": "RecordTypeId",
|
||||
"formula": "formula.sourceRecordTypeId"
|
||||
},{
|
||||
"targetObject": "Account",
|
||||
"targetField": "BillingCountryCode",
|
||||
"formula": "formula.sourceAddressCountryForFSL"
|
||||
},{
|
||||
"targetObject": "Account",
|
||||
"targetField": "BillingStreet",
|
||||
"formula": "formula.sourceAddressStreetForFSL + ' ' + formula.sourceAddressHouseNoForFSL"
|
||||
},{
|
||||
"targetObject": "Account",
|
||||
"targetField": "BillingPostalCode",
|
||||
"expressions": [
|
||||
"formula.exists = formula.sourceAddressPostalCodeForFSL"
|
||||
],
|
||||
"formula": "formula.exists ? formula.sourceAddressPostalCodeForFSL : null"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user