You need to sign in to do that
Don't have an account?
Michael OLIVERI
batch data loader and hierarchical field
Hello,
Currently we update our accounts on salesforce by an automatic batch that use data loader.
We do an insert of our new accounts each day.
Then we recuperate the salesforce ID for each account.
And finally we do an update of accounts.
We would like to use the functionnality upsert to simplify the treatment. We can create an external ID on salesforce with our ID to use upsert.
I doesn't test this part but I have no problem with this.
My problem is because we have a hierarchical field on account.
So if we use our id for an upsert I still need the Salesforce id for the hierarchical field.
Could we use the external id (our id) for the hierarchical information too please? And how can I do that?
Thanks for your help.
Currently we update our accounts on salesforce by an automatic batch that use data loader.
We do an insert of our new accounts each day.
Then we recuperate the salesforce ID for each account.
And finally we do an update of accounts.
We would like to use the functionnality upsert to simplify the treatment. We can create an external ID on salesforce with our ID to use upsert.
I doesn't test this part but I have no problem with this.
My problem is because we have a hierarchical field on account.
So if we use our id for an upsert I still need the Salesforce id for the hierarchical field.
Could we use the external id (our id) for the hierarchical information too please? And how can I do that?
Thanks for your help.
For what you're trying to do, it would be best accomplished with a before insert/update trigger.
Since there is a batch process to the data loader, if you're exceeding the batch size, you need to ensure that all of the "root" accounts are inserted first, then the first level down (where the parent ID is at the root level), then the next level, etc. This ensures that the parent account you're referencing has been created before, or at the same time, the trigger executes.
If you want to avoid writing a trigger, you could schedule a job that creates the hierarchy as well, though that is time dependent on when you're uploading the accounts.
Thanks for your reply.
I will see what can I done by trigger.