function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Boris SylvainBoris Sylvain 

Automate Contacts Updates

Hello,

I have an excel spreadsheet with a list of thousands name, last name ans mail address. These people have left their company and I am supposed to update the information on salesforce.
the process is:

- search the contact
- edit contact
- click on has left the company
- save
Repeat.

Does anyone has a code that does that?
Or can anyone, tell me what/how can I learn to implement that?

I usually code in VBA and I have some notions in Python.
It's the first time I try to implement a code on a website and I'm a bit lost.
I just learned HTML5 so now I can understand how the page is written. But I  don't know how to send a request and interact with the webpage.
Also I read about API, I think I understand what they're used for, but not how to use them.

Thank you for your help, I really need that.
 
Alain CabonAlain Cabon
Hi,

Why don't you use the  "Data Import Wizard" (Setup) directly or the free "data loader" (Setup) ?

If you want to code yourself a drag and drop of your excel file into Salesforce by using a VFP, you can use javascript libraries that are able to read directly the data of these uploaded excel file.

Ajay Gupta (closed blog) has written a complete solution (still here):
https://developer.salesforce.com/forums/?id=9060G000000BipoQAC

<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.8.0/jszip.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.8.0/xlsx.js"></script>

You use the power of these libraries in javascript called from the client side only by using only a VFP and remote objects for updating the data (for those looking for an ultra-stylish, luxurious modern alternative because we only use the "Data Import Wizard" (Setup) directly or the free "data loader" most of the time in reality when we want to update contacts in Salesforce).

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_remote_objects_using_update.htm