i am facing difficulty in setting the value of the Lookup in CRM using c#
i am using below code
public string CreateContact()
{
HttpClient httpClient = apiRequest.ConnectToCRM();
JObject contact1 = new JObject { { "firstname", "Peter" }, { "lastname", "Parker" }, { "annualincome", 90000 }, { "emailaddress1", "peter.parker@gmail.com" },{ "customertypecode",3} };
//Option2
contact1["jobtitle"] = "Business Analyst";
/* contact1["parentcustomerid"] = Convert.ToString(id);*//*new EntityReference("account", guid);*/
WebApiRequestStatus createStatue = apiRequest.CreateRecord(httpClient, contact1, "contacts");
return createStatue == WebApiRequestStatus.RecordCreated ? "Record has been created successfully" : "Failed to create a record. Please check the portallog table for more information";
}
please help me out how to fix it.
*This post is locked for comments