Hi guys,
i have a requirement i need to update child record from the parent context using custom workflow.
I used below code but throwing an error "given key was not present in the dictionary".
should i use any arguments to achieve this?
try
{
Entity entity = new Entity();
entity.LogicalName = "tj_country";
EntityReference child = (EntityReference)entity.Attributes["tj_child"];
Guid cid = child.Id;
Entity childentity = new Entity();
childentity.LogicalName = "tj_state";
childentity.Id = cid;
childentity.Attributes["tj_districts"] = new OptionSetValue(212200000);
service.Update(childentity);
}
*This post is locked for comments