CustShip Auto Invoice BPM to Auto Add MISC Charges line before Post


Hi, I’m looking any advice from Expertise here…
Recently I have a project that need to auto insert additional MISC Charges line in Invoice during CustShip generate an Invoice before get post.

I understand there’s process for GetShipment which able to generate Invoice on Shipment, but my process is during shipment tick “Ship” and the moment before Invoice post, I should do something through BPM to insert some Invoice line (MISC Charges) before get post, please any idea and advice.

I would like to know which BO should call in BPM and any solutions on this?


Customer Shipment UpdateMaster , Add Misc. Charges to Shipment which will be added to invoice.

1 Like

Hi Arul,
Thanks, I think i understand your idea, it’s working and thanks.

Add in Pre-Processing when ReadyToInvoice is ticked. Below code is from E9 which you should be able convert to a BPM in E10…

if(lCreateFrtCharge == true)
bool recSelected;
string whereClause = “MiscCode = '” + “FROT” + “’”;
System.Data.DataSet dsMiscChrgAdapter = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, “MiscChrgAdapter”, out recSelected, false, whereClause);
if (recSelected)
System.Data.DataRow adapterRow = dsMiscChrgAdapter.Tables[0].Rows[0];
edv = ((EpiDataView)this.oTrans.EpiDataViews[“ShipMisc”]);
DataRow edvRow = edv.CurrentDataRow;
edvRow[“Company”] = edvShipHead.dataView.Table.Rows[0][“Company”] ;
edvRow[“PackNum”] = edvShipHead.dataView.Table.Rows[0][“PackNum”] ;
edvRow[“MiscCode”] = adapterRow[“MiscCode”];
edvRow[“MiscCodeDescription”] = adapterRow[“Description”];
edvRow[“MiscAmt”] = lFreightCharge;
edvRow[“DspMiscAmt”] = lFreightCharge;
edvRow[“Description”] = adapterRow[“Description”];
edvRow[“Type”] = “A” ;
oTrans.Update() ;


Hi Arul, Thanks for your great sample code, I have an idea now for this.