Following is the xmlData i am using to send a insertRecords request to add Lead
XElement xml2 =
new XElement("Leads",
new XElement("row", new XAttribute("no", 1),
new XElement("FL", new XAttribute("val", "SMOWNERID"), myuserId),
new XElement("FL", new XAttribute("val", "First Name"), FirstName),
new XElement("FL", new XAttribute("val", "Last Name"), LastName),
new XElement("FL", new XAttribute("val", "Email"), EmailAddress),
new XElement("FL", new XAttribute("val", "Phone"), PhoneNo),
new XElement("FL", new XAttribute("val", "Zip Code"), ZipCode),
new XElement("FL", new XAttribute("val", "Description"), Comments),
new XElement("FL", new XAttribute("val", "Type of Account"), "Small Business"),
new XElement("FL", new XAttribute("val", "Company"), CompanyName),
new XElement("FL", new XAttribute("val", "No of Employees"), NoOfPartcipants),
new XElement("FL", new XAttribute("val", "Lead Status"), "Not Contacted"),
new XElement("FL", new XAttribute("val", "Lead Source"), "Lead Form")
));
Errorcode 4401: "Unable to populate data, please check if mandatory value is entered correctly."
When I removed "SMOWNERID" field from xmlData it is working fine.
How I can set the Lead Owner.
I am using user A auth token to send a Add Lead request and in that setting User B as Lead Owner, I have user B's userid and email though that I am using to send it though request.
Thanks in Advance.