Hi, can anyone help with my code. I have a problem with ID of the father field lookup on the contact
how can I link a father to a specific contact ID ? and where should i put this guid.
private void button1_Click(object sender, EventArgs e)
{
EntityReference contactId = new EntityReference("contact", d);
new_Child["d"]= 7bE2A476675EE8E61180D700155D004F8B;
// Create new_child female with fields
Entity new_Child = new Entity("new_child");
// QueryExpression query = new QueryExpression("new_child");
new_Child.Attributes["new_fullname"] = "elias";
new_Child.Attributes["new_gender"] = true;
new_Child.Attributes["new_father"] = new EntityReference("new_child", d);
new_Child.Attributes["new_age"] = 3; // this.new_Age.Text;
new_Child.Attributes["new_weight"] = (decimal)5.1; // this.txtWeight.Text;
new_Child.Attributes["new_height"] = (double)10.1;
_service = GetService();
g = _service.Create(new_Child);
}
Thank you
*This post is locked for comments