Hey - I have created a UD Field that reflects various status,
One of them is to show “Report Printed” while user print out the report under Maintenance Management…
I understand that this could be done by Code Custom (C#).
Please share the idea how to accomplish it with more efficiency…
Our Version: 10.2.300.9
I am almost reached to accomplish it. Missing that System is not accepting to Update the JobHead.
This looks like that UD Fields are not exposed in anywhere in the JobList Data View.
My Code is simple search wizard where I am passing Jobnum and trying to update a string UD Field :
private void SearchOnJobEntryAdapterShowDialog(string Jobs)
{
// Wizard Generated Search Method
// You will need to call this method from another method in custom code
// For example, [Form]_Load or [Button]_Click
bool recSelected;
string whereClause = string.Empty;
whereClause = "JobNum = '" + Jobs + "' BY JobNum";
System.Data.DataSet dsJobEntryAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "JobEntryAdapter", out recSelected, false, whereClause);
if (recSelected)
{
System.Data.DataRow adapterRow = dsJobEntryAdapter.Tables[0].Rows[0];
// Map Search Fields to Application Fields
EpiDataView edvjobList = ((EpiDataView)(this.oTrans.EpiDataViews["jobList"]));
System.Data.DataRow edvjobListRow = edvjobList.CurrentDataRow;
if ((edvjobListRow != null))
{
edvjobListRow.BeginEdit();
//edvjobListRow.UDField<string>("JobCardStatus_c") = "Job Printed";
edvjobListRow["JobCardStatus_c"] = "Job Printed"; //**Error here - Cannot Set JobCardStatus_c **
edvjobListRow.EndEdit();
}
}
}
I identified that Simple Search wizard do not expose the UD fields (as far as I saw)
I , then used the BO Object and used the GetBYID function to get it done !