Copy Fields From One table to the Other
Hi,
Can you please help me with the code below? I would like to copy the lead info from Lead table to the Client table if the Lead's Client_Relation is Self. This code will be put on the Client's Lead field when the lead is selected.
//copy lead info to client contact info if lead's client_relation is self
copyLead = Lead[ID == input.ID];
If (Lead[input.Client_Relation] == "Self" )
{
input.Title = copyLead.Title ;
input.Last_Name = copyLead.Last_Name ;
input.First_Name = copyLead.First_Name ;
input.Middle_Initial = copyLead.Middle_Initial ;
input.Office_Phone= copyLead.Work_Phone ;
input.Extension= copyLead.Extension ;
input.Home_Phone = copyLead.Home_Phone ;
input.Mobile_Phone = copyLead.Mobile_Phone ;
input.Fax = copyLead.Fax;
}
Please advise.
Thanks