Good afternoon,
I have a form that lists chemicals that are set to expire in the next 90 days. To this dashboard, I added a blank tracker form. I opened the form in customization mode, and added a button to the tracker form. My goal is to have the button pull the part number from the grid’s selected row, and pass that part number into a callcontext field. Once that is done I want my UBAQ custom action to run. My custom action is designed to generate a new requisition head, and detail.
I think the req head is created ok, as I can see a list of the reqs my UBAQ created as I am testing. However the req detail, or req line is not getting created correctly. Instead my BPM gives this error: Requisition for Other is not allowed for a Quantity Bearing Part.
## System Information ##
==================
AppServer Connection: https://centralusdtpilot01.epicorsaas.com/SaaS512Pilot
Form Name: List of expiring chemicals
Customization Name: Custom1
Menu ID: UD4161
Software Version: 4.2.100.5
============
Business Layer Exception
Requisition for Other is not allowed for a Quantity Bearing Part.
Exception caught in: Epicor.ServiceModel
## Error Detail ##
============
##!Correlation ID:##! 828a4bbb-aa8f-4be0-a677-6f521d19dc47
##!Description:##! Requisition for Other is not allowed for a Quantity Bearing Part.
##!Program:##! Erp.Services.BO.Req.dll
##!Method:##! validateTranType
##!Line Number:##! 2628
##!Column Number:##! 29
## Client Stack Trace ##
==================
at Ice.Cloud.ProxyBase`1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer)
at Ice.Cloud.ProxyBase`1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Proxy.BO.DynamicQueryImpl.RunCustomAction(DynamicQueryDataSet queryDS, String actionID, DataSet queryResultDataset)
at Ice.Adapters.DynamicQueryAdapter.<>c__DisplayClass43_0.<RunCustomAction>b__0(DataSet datasetToSend)
at Ice.Adapters.DynamicQueryAdapter.ProcessUbaqMethod(String methodName, DataSet updatedDS, Func`2 methodExecutor, Boolean refreshQueryResultsDataset)
at Ice.Adapters.DynamicQueryAdapter.RunCustomAction(DynamicQueryDataSet queryDS, String actionId, DataSet updatedDS, Boolean refreshQueryResultsDataset)
I am using BO method widgets to duplicate the methods I traced from manually creating a requisition and detail line.
I know that I can manually create a req head and line for the part in question. I don’t get any such error when I create it manually.
Has anyone seen this error before? I assume that I am missing something when I setup my requisition line.
Screenshots following show my setup:
// Dashboard customization
private void BAQRunCustomAction(EpiDataView iEdv, string iActionID)
{
BAQDataView BAQView = (BAQDataView)iEdv;
Assembly assembly = Assembly.LoadFrom("Ice.Lib.EpiClientLib.dll");
Type t = assembly.GetType("Ice.Lib.Framework.BAQUpdater");
BindingFlags bf = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy;
MethodInfo mi = t.GetMethod("BAQRunCustomAction", bf);
object[] param = new object[] { BAQView, iActionID};
mi.Invoke("Ice.Lib.Framework.BAQUpdater", param);
}
private void btnGenReq_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
//Run Custom Action to generate a new requsition.
// Pass in part number through call context field.
EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews["CallContextBpmData"]));
System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;
var edvV = oTrans.Factory("V_ExpiringLots_1View");
MessageBox.Show(edvV.dataView[edvV.Row]["PartLot_PartNum"].ToString());
edvCallContextBpmDataRow["Character08"] = edvV.dataView[edvV.Row]["PartLot_PartNum"].ToString();
BAQRunCustomAction(edvV, "GenReq");
}