09-12-2017 09:16 AM
I need to be able to read any object in Salesforce and write it out as a CSV file. To do this I need to be able to flatten the output dynamically.
Sample json:
[{
"Account_Class_vod__c" : "abc",
"ShippingAddress" : {
"city" : "aaa",
"country" : "Russia",
"countryCode" : null,
"geocodeAccuracy" : null,
"latitude" : null,
"longitude" : null,
"postalCode" : "306200",
"state" : "sss",
"stateCode" : null,
"street" : "st"
},
"Ownership" : "N"
}, {
"Account_Class_vod__c" : "abc",
"ShippingAddress" : {
"city" : "aaa",
"country" : "Russia",
"countryCode" : null,
"geocodeAccuracy" : null,
"latitude" : null,
"longitude" : null,
"postalCode" : "306200",
"state" : "sss",
"stateCode" : null,
"street" : "st"
},
"Ownership" : "N"
}, {
"Account_Class_vod__c" : "abc",
"ShippingAddress" : {
"city" : "aaa",
"country" : "Russia",
"countryCode" : null,
"geocodeAccuracy" : null,
"latitude" : null,
"longitude" : null,
"postalCode" : "306200",
"state" : "sss",
"stateCode" : null,
"street" : "st"
},
"Ownership" : "N"
}
]
Solved! Go to Solution.
10-02-2017 08:49 PM
We solve this by using a python script. I shared this under “Showcase” section. You can locate the “flattener” python script under Utilties / Collection of Python Scripts.
10-02-2017 08:49 PM
We solve this by using a python script. I shared this under “Showcase” section. You can locate the “flattener” python script under Utilties / Collection of Python Scripts.
10-03-2017 06:29 AM
Exactly what I was looking for! Thanks!
08-06-2018 07:19 AM
I cant find this script. Can you please guide me to correct location for this script.
08-06-2018 04:06 PM
Surya, if you check out the post here, Alan links to a box folder with the resource you are looking for.