Find your content:

Search form

You are here

Unable to insert picklist right value Using Apex Data Loader


I am trying to insert records from a csv file to salesforce leads abject using Apex dataloder. My Leads in csv file

Last Name | Company | Title  | Mobile      | Lead Status        | Website
Vineeth1    RK         HR      98786457123  Open - Not Contacted
Anuraj1     RK         Dev     96439841365  Working - Contacted

when i am trying to insert these records into the salesforce lead object using Apex dataloader, all fields other than Lead Status is getting inserted properly, but the lead status is always " Open - Not Contacted "

The lead status field has picklist values - "Open - Not Contacted", "Working - Contacted" , "Closed - Converted", "Closed - Not Converted".

the success report also contain the same way as in the record in csv file.

id |Last Name | Company|Title|Mobile    | Lead Status          | Website    | status
    Vineeth1  RK       HR   98786457123  Open - Not Contacted  Item Created 
    Anuraj1   RK       Dev  96439841365  Working - Contacted      Item Created

Can anybody guide me to do the proper way doing insertion using Apex dataloder. Please tell me what i am doing wrong.

Attribution to: AnuRaj

Possible Suggestion/Solution #1

I can think of two reasons :

  1. You are not mapping the lead status field properly.
  2. A workflow or triggers is executed, by which the status is changing to "Open - Not Contacted"

Attribution to: Laxman Rao

Possible Suggestion/Solution #2

I have had an issue with picklist values that contain dashes/hypnens: "-". If I have copied and pasted from a Microsoft Word doc into the UI field definition, it may paste in with a long dash character instead of a hyphen, because that's the character Word autoreplaced the hyphen with. Then any Apex that refers to this value using the hyphen character will not match.

The hard part about diagnosing this is that the picklist value looks the same in the UI itself; Salesforce will not display the dash, it displays the hyphen, even though the underlying value uses a different character. My solution was to delete that picklist value and recreate by typing it in again with an explicit hyphen.

For most picklists I would expect the record to accept whatever value is being loaded, but a standard field like Status may be restricted to only take the values it already has?

Attribution to: Jeremy Nottingham
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content