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
BKBK 

How to update information through the office toolkit

Hey guys,
how do i update data in salesforce via the tookit? Right now, I am only pulling information. Also, I would like to incorporate an "if then condition" as far as when to update data. example would be, field is blank then update with "x"

thanks and regards,
bouscalbouscal

Hi BK, have you read through the online help files?  Ron's done an excellent job of describing how to use the tool for updates, inserts, deletes etc.

For the If/Then, the best bet would be to only retrieve the records you want to update, ie <field> is blank and update those. 

Another alternative would be to add a column (I'll use C as the column your data exists in and D as the new blank column)  In column D you would enter the IF formula, =IF(C# = "", <new value>, C#)  This will put your new value into the cell in column D if C is blank or put the value from C into D.  Once you've run this formula down the entire column you can then Copy column D, right click and Paste Special - Values.  This will get rid of the formula and leave you with column D containing all the values you want for that field.  Move the header from C to D, delete column C and update the new column C. 

A little confusing but it works.

Tim