protected void Page_Load(object sender, EventArgs e) { this.SageCRMEntryItem.EvalCode = "eWare.Mode =1;"; this.SageCRMEntryItem.EvalCode += "Group = eWare.GetBlock(\"entrygroup\");"; this.SageCRMEntryItem.EvalCode += "PersonSearch = eWare.GetBlock(\"entry\");"; this.SageCRMEntryItem.EvalCode += "PersonSearch.FieldName = \"SearchPerson\";"; this.SageCRMEntryItem.EvalCode += "PersonSearch.EntryType = 56;"; this.SageCRMEntryItem.EvalCode += "PersonSearch.LookupFamily = \"Person\";"; this.SageCRMEntryItem.EvalCode += "Group.AddEntry(PersonSearch);"; this.SageCRMEntryItem.EvalCode += "Group.DisplayForm=false;"; this.SageCRMEntryItem.EvalCode += "Response.Write(Group.Execute());"; // Response.Write(Request.Form.ToString()); if (Request.Form["SearchPerson"] != null) { this.Comp_CompanyId = Request.Form["SearchPerson"].ToString(); } if (this.Comp_CompanyId != "") { SageCRMDataSource1.TableName = "Person"; SageCRMDataSource1.WhereClause = getWhereClause(); SageCRMDataSource1.Parameters.Add("pers_xxxxxxxxxId", getEntityIDFieldValue()); SageCRMDataSource1.UpdateRecord(); Response.Redirect(SageCRMTabGroup.CRMURL("entwiz/PeopleList.aspx").ToString() + "&" + getEntityIDField() + "=" + getEntityIDFieldValue()); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString.Get("nrid") != null) { //update the record just created with the project id SageCRMDataSource1.TableName = "projecttasks"; SageCRMDataSource1.Parameters.Add("task_crmprojectid", Session["proj_projectid"]); SageCRMDataSource1.WhereClause = "task_projecttasksid=" + Request.QueryString.Get("nrid").ToString(); SageCRMDataSource1.UpdateRecord(); } this.SageCRMListBlock.EntityWhere = "task_crmprojectid=" + Session["proj_projectid"]; }