You need to sign in to do that
Don't have an account?
Contact Field Problem
Hello,
I am trying to create a new contact with the insert method
When I run this code:
object[] ret;
mapEntry[] record = new mapEntry[6];
//Create new mapentries and set the values for each field
record[0] = new mapEntry();
record[0].key = "firstName";
record[0].value = fname;
record[1] = new mapEntry();
record[1].key = "lastName";
record[1].value = lname;
record[2] = new mapEntry();
record[2].key = "Phone";
record[2].value = phone;
record[3] = new mapEntry();
record[3].key = "Fax";
record[3].value = fax;
record[4] = new mapEntry();
record[4].key = "Email";
record[4].value = email;
record[5] = new mapEntry();
record[5].key = "accountID";
record[5].value = accounttid;
ret = (object[]) sforce.insert("contact", record);
I get this error message:
Fault Code: 0
Fault string: bad field names on insert/update call: Email, Fax, Phone
I ran a describe on "Contact" and found that most of the fields were not accepted by insert.
Where can i find a list of valid fields to use in code.
Thankyou,
GL
Hi eddie,
Looks like 2.0 code to me. Not the best decision when using .Net. You should seriously consider using the 3.0 api.
The field names in 2.0 are case sensitive, so Email should be email etc.