GetNewOrderDtl Method on SalesOrder BO


I’m trying to set the price lock when a new order line is created to true. I can successfully throw a message on a pre-process directive on this method, but when I try to set the price lock to true via pre process it does not set the field. Any idea why? I tried all row options as well. Im using the set field bpm widget.


It had to be post-processing! Got it!

1 Like

You’ll need to set the field on post-processing, since the record doesn’t exist until after GetNewOrderDtl runs.

1 Like


Hi pro,
Please advise what I has miss which I still unable to fill the Unit Price even I has put in some verification and update, the below is my code:

	string cTableName = "OrderDtl";
	bool lCheckForOrderChangedMsg = true, lcheckForResponse = true, lweLicensed = false, lContinue = false; 
	string cResponseMsg, cCreditShipAction, cDisplayMsg, cCompliantMsg, cResponseMsgOrdRel, cAgingMessage;
	int NewSONum = 20034, CustNum = 163;

	SalesOrderAdapter _soDtl = new SalesOrderAdapter(this.oTrans);
	DataRow detailRow = _soDtl.SalesOrderData.OrderDtl[_soDtl.SalesOrderData.OrderDtl.Rows.Count - 1];
 	detailRow["DspUnitPrice"] = 4.23;
    detailRow["UnitPrice"] = 4.23;
    detailRow["DocUnitPrice"] = 4.23;
    detailRow["SellingQuantity"] = 100;
    detailRow["PartNum"] = "FG009387";
    detailRow["SalesUM"] = "KG";
	_soDtl.ChangePartNum(false, "KG");
						out lContinue, 
						out cResponseMsg, 
						out cCreditShipAction, 
						out cDisplayMsg, 
						out cCompliantMsg, 
						out cResponseMsgOrdRel, 
						out cAgingMessage);


For info I able to create the line successfully but just my bad luck I unable to fill the unit price in this code, any suggestion and advice to me, please thanks.