Hi
I need to set a value to a lookup field but I don't know how to do that
this is the code I have
var entity = context.GetEntityFromContext().ToEntity<pwc_contract>();
var aircraftid = aircraftRetrieved.Entities[0].Attributes["pwc_aircraftid"];
var aircraftGuid = new Guid(aircraftid.ToString());
entity.Attributes["pwc_aircraftid"] = new EntityReference("pwc_aircraft", aircraftGuid);
service.Update(entity);
the lookup field is "pwc_aircraftid"
I hope you can help me
thanks
*This post is locked for comments
I have the same question (0)