You need to sign in to do that
Don't have an account?
pathworks
Error updating a custom field on Lead using Partner API
I seem to be a bit inept today, so I'm sure I'm doing something wrong. But...when I try to update a custom field on Lead using the Partner API (now that I'm using the correct endpoint), I get an error that the field does not exist.
"common.exception.ApiQueryException: No such column 'AMBI_Pathworks_ID' on entity 'lead'."
However, if I go to the Setup->Customize->Lead->Fields screen, I can see that there is a custom field of type text, with that exact name = AMBI_Pathworks_ID.
Here's my code, which is pretty straightforward. Do I have some sort of namespace problem? I think this is exactly like a sample I found.
MessageElement [] updateFields = new MessageElement[1];
updateFields[0] = new MessageElement(new QName("AMBI_Pathworks_ID"), newTask.getId());
SObject leadUpdate = new SObject(type, new String [] {}, id, updateFields);
binding.update(new SObject [] {leadUpdate});
updateFields[0] = new MessageElement(new QName("AMBI_Pathworks_ID"), newTask.getId());
SObject leadUpdate = new SObject(type, new String [] {}, id, updateFields);
binding.update(new SObject [] {leadUpdate});
Thanks again for the help,
Dan
Managed to figure this one out myself. Append __c to the end of the field name and it works.
Dan
As is Developer's Sidekick. Free too.
http://www.salesforce.com/appexchange/detail_overview.jsp?id=a0330000001m7zEAAQ
G.