Dear Team,
is it possible to call BPM code from customization values.
Kindly help on this.
Dear Team,
is it possible to call BPM code from customization values.
Kindly help on this.
What are you trying to achieve?
Am tried to pass the values BPM to customization.
Example in BPM:
callContextBPMData.Character01 = “0001”
how to receive and bind in textbox in Customization code.
callContextBPMData is just another view from within a customization.
You can bind it directly if you need to, without needing code. In the dropdown of the EpiBinding property of your textbox you’ll see it listed as an option.
If you do want to access it in code, then
EpiDataView edvCallContextBpmData = (EpiDataView)oTrans.EpiDataViews["callContextBpmData"];
A shorter version is:
EpiDataView edvCallContextBpmData = oTrans.Factory("callContextBpmData");
Does that return a fresh EpiDataView? I suspect it’s subtly different than simply using the one that’s already there, but could be useful, thanks.
Same results. Just faster to type.
I often call BPM from customization when I am Update dataset.
Here is example of deleting labor detail entry:
From customization:
UD35Adapter ud35 = new UD35Adapter(oTrans);
ud35.BOConnect();
ud35.GetaNewUD35();
int rowCount = ud35.UD35Data.UD35.Rows.Count;
DataRow dr = ud35.UD35Data.UD35.Rows[(rowCount-1)];
dr.BeginEdit();
string key1 = DateTime.Now.ToString("yyyyMMddHHmmssffffff");
dr["Key1"] = key1;
dr["Key2"] = "LaborDelete";
dr["Number01"] = Convert.ToInt32(gridHistory.ActiveCell.Row.Cells["vw_LaborAlloc_LaborHedSeq"].Value);
dr["Number02"] = Convert.ToInt32(gridHistory.ActiveCell.Row.Cells["vw_LaborAlloc_LaborDtlSeq"].Value);
dr.EndEdit();
ud35.Update();
ud35.Dispose();
gridHistory.ActiveCell.Row.Cells["Calculated_Process"].Value = getLaborProcessStatus(key1);
gridHistory.ActiveCell.Row.Update();
On the BPM Side:
I would add that it returns the requested EpiDataView if it exists, else it creates a new one with the name specified.
Dear Team,
Thanks for you quick response. I’m tried to call BPM Call Context values inside the Customization block.
Hi @Isai,
you can use this code to call any callcontextBPM variable, the only issue that you need to cater where in your customization that you need to do so, i.e. after your BPM casting the relevant values to these variables.
EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews["CallContextBpmData"]));
System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;
if ((edvCallContextBpmDataRow != null))
{
edvCallContextBpmDataRow.BeginEdit();
[edvYourFormField]=edvCallContextBpmDataRow["XXXXXXXX"];
edvCallContextBpmDataRow.EndEdit();
}