I am trying to use a .Net application to integrate into Epicor. For one of the tasks we need to populate a UD field on PartTran when there is a misc issue / return. I have added the UD field to the PartTran table and re-generated the data model however the UD field is not available to populate in the IssueReturnDataSet. As a workaround i am trying to put the data into a BPMContext field and will copy it to PartTran in a BPM. However i have no idea how to access the BPMContext data from an external application. (I can get the IssueReturn BO and issue and return misc material the bit missing is populating the PartTran UD field.
Just to clarify - I assume you are using the E10 client dlls and going through the Impls?
( Or SOAP? Or REST?)
The BPMContext dataset is serialized between client and server as a Message Header. Depending on how you do the integration, the access to that header varies.
Yes I am using the client dlls.
We plan to upgrade to 10.1.600 soon and some time after that i want to change our integrations to use REST but that is for another day
Brett
Here is an example of passing in BPM Data from an External call to a BO
using (var dynQry = GetEpicorBOInstance<DynamicQueryImpl, DynamicQuerySvcContract>(binding, new Uri($"https://{Settings.Default.Server}/{Settings.Default.Instance}/ICE/BO/DynamicQuery.svc"), Settings.Default.UserName, Settings.Default.Password))
{
//Instanciate Date Context Data Set
dynQry.BpmContext = new Ice.Bpm.Context.ContextDataSet();
//Create BPM Data Row
var bpmDataRow= dynQry.BpmContext.BpmData.NewBpmDataRow();
//Set Fields
bpmDataRow.SysRowID = Guid.NewGuid();
bpmDataRow.Character01 = "MYChar01";
//Insert into BO
dynQry.BpmContext.BpmData.AddBpmDataRow(bpmDataRow);
var eP = dynQry.GetQueryExecutionParametersByID(args[0]);
bool morePages;
var rslt = dynQry.GetListByID(args[0], eP, 0, 0, out morePages);
foreach(DataRow r in rslt.Tables["Results"].Rows)
{
r["RowMod"] = "U";
}
dynQry.UpdateByID(args[0], rslt);
}
3 Likes
Once again, Thanks Jose