I have been working on creating a BPM to automate some of the RMA process and am currently working with the creation of a new receipt process where a serial number must be selected. I have got the process working up until that last part where I get an error stating that I haven’t selected enough serial numbers. (Usually 0 of 1) I have performed a trace and compared the functions but don’t see anything obviously missing. I have also got this complete process working perfectly in a customization, but wanted to move it to a BPM.
The process is in an epicor function that is used in an update BPM on a UD table.
Any help towards solving this would be greatly appreciated!
My solution required reflection. I cant outright share the code as it is a customer solution, but here is the method I used to commit my serial changes.
void CommitSerials(ConcurrentQueue<SelectedSerialNumbersDataSet> list, ProgressBar pb )
{
var sn = (SelectedSerialNumbersDataSet)oTrans.GetFieldValue("dsTempSelectedSN");
foreach(var s in list)
{
sn.SelectedSerialNumbers.Merge(s.SelectedSerialNumbers, true, MissingSchemaAction.Ignore);
pb.PerformStep();
}
sn.AcceptChanges();
}
I appreciate a look at the code but I needed this to work in an epicor function because of the issues with the RMA adapters not wanting to play nice. I was not able to get this done in a widget function so I moved everything to a custom code function and added it directly to the table. Works great now for automating the RMA Receipt creation and disposition process.
Hi - came across your post while also trying to automate RMA proc through a BPM. Seems like the Epicor RMA BO don’t like serial numbers. I keep running into the issue that I haven’t selected any serial numbers (when I have). You said you moved to custom code rather than the widgets, any chance you would share how you managed to do this?
Thanks
James
Sure, but forgive me as I retrace my steps on this project as I don’t recall everything I did.
To be specific I moved the code for creating the RMA receipt to an Epicor custom code function that I call in a BPM but it mostly follows what was listed above, minus some tweaks to get it to run in an Epicor function. The main addition that worked for me was making sure the RowMod of the SelectedSerialNumbers tableset was set to “A”. I believe this is what solved the error you are running into for me.