You need to sign in to do that
Don't have an account?
Dscer
API create call returns invalid sObject type
I am attempting to create a new Case record using the API, Partner WSDL. I keep getting the following error:
sObject type 'sObject' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
I can successfully call create with Account and Contact. I can also successfully call describeSObject with Case as the parameter.
Any ideas?
Hi Dscer.
here
att[0] = doc.CreateElement("Status"); att[2].InnerText = "Open";
att[1] = doc.CreateElement("Priority"); att[3].InnerText = "2 (Medium)";
att[2] = doc.CreateElement("Account"); att[4].InnerText = "001T0000007LeTQIA0";
att[3] = doc.CreateElement("Contact"); att[5].InnerText = "003T000000GA2OdIAL";
att[4] = doc.CreateElement("Type"); att[7].InnerText = "Incident";
att[5] = doc.CreateElement("Subject"); att[10].InnerText = "A problem";
att[6] = doc.CreateElement("Description"); att[11].InnerText = "This is the problem";
You are refering "Account" and "Contact" standard fields of "Case" isn't it.
If so, Use "AccountID" and "ContactID" instead and see if it works.
Do reply as i have some more inputs.
-Abhishek Singh
I changed the Account and Contact field names to AccountId and ContactId and that fixed the problem.
I think that the error message returned in this instance is mis-leading. In the past, when I've typed a field name wrong, I've gotten a "Invalid field" error returned.
Thank you all for your help. It is what the boards are for.