Skip to main content
Antonino Cupi (Edreams Odigeo) ha fatto una domanda in #Apex
Hi all,

I'm struggling to find out the best solution to the following scenario: I have a big static csv file containing data not related to salesforce. I would like to get a specific value on my csv file and save it on a specific field on the account. How can I create the connection between my org and my local csv file? I tried to upload the csv file on Documents in my org but it's too big. I think dataloader is not my solution because it needs an external id to update the account but in my csv file I have data not related to salesforce. 

Thanks in advance
2 risposte
  1. 4 ott 2018, 05:20
    Hi Antonino,

    You can use the Data Loader to upsert your accounts, matching them on your External Id column. Make sure to select the Upsert operation, and tell Data Loader you want to match using that field.

    Data Loader will provide you with an opportunity to map columns between your CSV file and your Salesforce object. When you do so, you'll map only those fields that you want to update. It doesn't matter if there is a lot of unrelated data in your CSV - simply don't map those fields. Only the fields you map will be updated in Salesforce by Data Loader.

    It sounds like you need to map only your External Id and a single other fields. That's fine. If it increases your comfort level, simply create a copy of your CSV and delete all of the other columns before beginning your load process.

    If the value you are working with is not, in fact, an External Id and you cannot make it such for some reason, your next step is likely to use a tool like LibreOffice or Microsoft Excel to perform an INDEX()/MATCH() or VLOOKUP() pass to map from your shared data point to a Salesforce Id or External Id column on the Account. You would then use that value to perform your update or upsert operation.

    In that situation, you'll need to take care to handle case correctly - if your non-external-Id is not case-safe, be aware that these Excel functions treat, e.g., AAa and AAA as equivalent. You can get around this using array functions, but it can be excruciatingly slow. You'll also have to account for any duplicate values appropriately.

    Hope this helps.

    Kindly mark this as solved if the reply was helpful.

    Thanks,

    Nagendra
0/9000