I have managed to get the Job number into a added field to the partLot view, but I need to pass it on to the GetNewPartLot bpm.
I assume that the bpm will be executed after the load of the Lot Attribute form and have tried to pass the job number down to the BPM. How can I do this? I have to put it in the current dataview (can see it in my form), but not in the BPM post-processing (assume that there is a new tt record created, can see the PartNum though) . Code in the form works fine and I am able to verify the JobNum in the form.
Or is there a similar way to find the calling procedure in the BPM as in the form?
Code:
private void LotAttributesForm_Load(object sender, EventArgs args)
{
// Add Event Handler Code
EpiDataView EPL = ((EpiDataView)(this.oTrans.EpiDataViews["AutoAttachpartLot"]));
if ((EPL.Row < 0))
{
return;
}
foreach (Form f in Application.OpenForms)
{
if (f.Name == "RcptToInvForm")
{
BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public;
Type type = f.GetType();
var field = type.GetField("trans", flags);
var transObj = field.GetValue(f);
Type transType = transObj.GetType();
var keyField = transType.GetProperty("KeyField",flags).GetValue(transObj);
EPL.dataView[EPL.Row]["DrawDesc"] = keyField;
var edvBPMData = this.oTrans.Factory("CallContextBpmData");
var edvBPMDataRow = edvBPMData.CurrentDataRow;
if(edvBPMDataRow != null)
{
edvBPMDataRow["Character01"] = keyField;
}
}
}
}