Hello,
I create a lead in my code and now i want to put out the EntityReference from the lead but everything i try wont work..
This is my code:
Entity lead = new Entity("lead");
lead["subject"] = "Test";
lead["salutation"] = anrede;
lead["firstname"] = vorname;
lead["lastname"] = nachname;
lead["address1_line1"] = "";
lead["address1_postalcode"] = "";
lead["city"] = "";
lead["telephone1"] = telefon;
lead["emailaddress1"] = email;
_lead = service.Create(lead);
Entity leadid = new Entity("lead");
leadid = service.Retrieve(lead.LogicalName, _lead, new ColumnSet(true));
Lead.Set(executionContext, leadid.ToEntityReference());
Thank you in advance!
Kind Regards
Léon
*This post is locked for comments
I have the same question (0)