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
Data Dash Inc.Data Dash Inc. 

Help with Apex dataloader

Hey there, I am hoping that this is put into the right section. I was wondering if anyone knows of a tutorial PPT file or the like on Dataloader and donations? Another question I have is how do you get the account id for each donation, should this be a last name or address or does it have to be defined by dataloader.
 
aalbertaalbert
Here is a good starting point for the Data Loader: http://wiki.apexdevnet.com/index.php/Data_Loader

And you can download it from the salesforce.com application directly. So Login, go to Setup -> Administration Setup-> Data Management->Data Loader.


Data Dash Inc.Data Dash Inc.
Thanks, Im just not to sure where to find any information pertaining to ID problem that im having. Any ideas on how to go a bout getting the IDs from a batch.

Message Edited by Data Dash Inc. on 01-14-2009 03:27 PM
aalbertaalbert
Sorry, can you elaborate on what you mean by 'donations'? Not sure I follow.
Data Dash Inc.Data Dash Inc.
Sorry for the confusion. By donations I mean a list of names, amounts, etc... stored in a CSV file. I have that file but I am not sure on the ID field.. It seems that when I use the First name of the individual and the address for the "External ID" it says that it is not valid.. Is there a way to use the afore mentioned file in Dataloader to generate the IDs or am I missing something here.
aalbertaalbert
Are you trying to insert or update data into SFDC? Or upsert? Or are you extracting data out of SFDC?
External Id field is primarily used when "upserting" data into salesforce.com. Have you defined a custom 'text' field and specified it as "external id" (checkbox that needs to be set when creating the custom field)?

Data Dash Inc.Data Dash Inc.
Yes I am trying to upsert with data loader into the sales force website, I am just not sure on how to assign the external ID field with the CSV file I made in Excel.


Message Edited by Data Dash Inc. on 01-15-2009 03:59 PM
aalbertaalbert
Ok, lets break this up into different pieces.
First, the salesforce.com configuration. Make sure you have defined a custom field on the object you want to upsert again (ie Account, Contact, Lead, or custom object, ect). When defining the custom field, create a "text" field, specifiy the field name and field label, and make sure to check the "External Id" property. That is important. By doing that, you enable the upsert call against that field to be valid. Finish creating the custom field. When done, lets move back to the CSV file.

In the CSV file, the first row should be the headings or field names of your choosing. The second and following rows should be the data that you want to upsert.

Then launch Data Loader, login to the org you want to upsert into, select the Object you want to upsert into, and find the CSV file you want to use as the data to be loaded. Now, the Data Loader wizard will ask you which field you want to use as the external Id in a simple drop down. Pick the field you want to use as the external id. Finish mapping the CSV headings to fields and finish the wizard. At this point, Data Loader will upsert the data and output 2 fields (success.csv and errors.csv).

I hope that helps you get going.
Data Dash Inc.Data Dash Inc.
Wow thanks for your help that got rid of my ID error I really appreciate your time.. Now I'm having problems with "stagename" and "closedate" what are these two fields, and what should their values contain?
aalbertaalbert
It sounds like you are upserting against the Opportunity object.
CloseDate is a Date field. So YYYY-MM-DD format.
StageName is a picklist. To see the full list of values, you can either go through the UI (Setup->Customize->Opportunity->Fields->Stage). Also, tools such as Apex Explorer (http://wiki.apexdevnet.com/index.php/Apex_Explorer) or the Force.com IDE Schema Explorer (http://wiki.apexdevnet.com/index.php/Force.com_IDE) show you your entire sfdc schema (all objects, all fields, the properties on the fields, ect). I highly recommend those tools to help you out.


Data Dash Inc.Data Dash Inc.
Thanks for the help, but I am still not getting it right I will try to give you the details and maybe you can help me out. I have a CSV file that contains amounts of money donated, the name, address, and an ID we made. What I would like to do is have dataloader upload these all at once using our IDs  and link the Donation to the contact name in  the salesforce website. Is there a way to do this and if so how?    


Message Edited by Data Dash Inc. on 01-20-2009 03:13 PM
JAW99JAW99

aalbert wrote:
Now, the Data Loader wizard will ask you which field you want to use as the external Id in a simple drop down. Pick the field you want to use as the external id. 

 

 

OK, that never happens for me.  I am never asked what field to use as the external ID. Can someone helpwith that?

Message Edited by JAW99 on 04-01-2010 07:24 AM
JAW99JAW99
OK, I figured this out, the column needs to be labeled the id. Not clear from the documentation to me, but got it now.
ErikTheTinkererErikTheTinkerer

I added some detail on this topic to the Dataloader Wiki docs:

Additional Detail on Using External Ids

 

Also, not that you can only reference External IDs when doing an Upsert (not Inserts). It doesn't matter what the fields or headers are called.