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

overwrite non-null values with null via api

We are integrating with SFDC via the WSDL, and I'm curious to know the correct way to set the flag "Insert null values", similar to how the data loader and other tools allow you to overwrite an existing field value with null if it already contains a non-null value.


It appears that this must be set at the field level in the WSDL with a boolean flag, but other tools appear to set this at the operation or job level.


Any insight anyone could provide would be greatly appreciated.




In the data loader, if you check insert null values, then any null columns in the data source will set the field name in the filedsToNull array property for that row.


e.g if you want to update an account, and set its accountNumber to null, and set its name to "foo", you'd do something like


Account a = new Account();


a.setFieldToNull(new String[] { "accountNumber" });

SaveResult [] sr = binding.update(new SObject[] {a});


There should be more details in the api docs. 


thanks for the response, simon.  a question for you - do i have to specify fieldsToNull for each record? 


for example, if i am integrating two data sources, one field i am mapping is workphone, but if my new source data has no workphone, i want to overwrite the existing value in the workphone field with null.  but if there is a value in my source, then i want to update sfdc to that valueas well. 


so i guess my question is, do i need to logically determine which fields are null in the source and add them to fieldsToNull for that individual record,  or would it be possible to just list all fields for that object in fieldsToNull as well as map source values to those same fields?


also, are the values comma separated, semicolon, etc?


thanks very much for the info!

You have to specify it for each row. And its an array, you don't need a delimitor

Hi All,


We are using Informatica web service consumer to access salesforce. Can someone help me to overwrite non-null values with null in Informatica?


Thanks in advance,






We have found a setting in the session that allows us to indicate "Set to Null" (or something), however, it doesn't seem to be working for us.  What did you come up with for the solution?




Hi there,


To null value in Salesforce via INFORMATICA, we have turn on 'Set fields to null' option at session level. However, it doesn't work as expected. Any update on this? Anyone has ever try on this option?





Mayank Gupta 88Mayank Gupta 88
The above solution suggested by Evonne and Safari worked for me to set fields to NULL in Salesforce via Informatica Powercenter. Thanks guys!