protected void PriorApp_LookUp(object sender, AxLookupEventArgs e)
{
string Employee;
// AxBoundField boundField = (AxBoundField)sender;
AxLookup lookup = e.LookupControl;
using (Proxy.SysDataSetBuilder sysDataSetBuilder = Proxy.SysDataSetBuilder.constructLookupDataSet(this.AxSession.AxaptaAdapter, TableMetadata.TableNum(this.AxSession, \”TrvExpTable\”)))
{
// Set the run time generated data set as the lookup data set
lookup.LookupDataSet = new Microsoft.Dynamics.Framework.Data.Ax.DataSet(this.AxSession, sysDataSetBuilder.toDataSet());
}
Employee = ApplicationProxy.TrvExpTable.EmployeeEP(this.AxSession.AxaptaAdapter, this.ExpNumber);
// Filter the lookup to only display acceptable account types
using (Proxy.Query query = lookup.LookupDataSet.DataSetViews[0].MasterDataSource.query())
{
// query.dataSourceNo(1).addRange(TableDataFieldMetadata.FieldNum(this.AxSession, \”TrvExptable\”, \”txt2\”)).value = Label_Purpose.Text;
query.dataSourceNo(1).addRange(TableDataFieldMetadata.FieldNum(this.AxSession, \”TrvExptable\”, \”Employee\”)).value = Employee;
query.dataSourceNo(1).addRange(TableDataFieldMetadata.FieldNum(this.AxSession, \”TrvExptable\”, \”asu_TypeOfRequest\”)).value = \”1\”;
query.dataSourceNo(1).addRange(TableDataFieldMetadata.FieldNum(this.AxSession, \”TrvExptable\”, \”ApprovalStatus\”)).value = \”3\”;
}
}