ive added in the code, but on creation of a new order dtl line i get a bpm error
Server Side Exception
BPM runtime caught an unexpected exception of ‘NullReferenceException’ type.
See more info in the Inner Exception section of Exception Details.
Exception caught in: Epicor.ServiceModel
Error Detail
Correlation ID: cb1fad86-3870-4dde-a98f-ee8ecccb8c2f
Description: BPM runtime caught an unexpected exception of ‘NullReferenceException’ type.
See more info in the Inner Exception section of Exception Details.
Program: Erp.BO.SalesOrder.GetNewOrderDtl.dll
Method: A001_CustomCodeAction
Original Exception Type: NullReferenceException
Server Trace Stack: at Epicor.Customization.Bpm.BO.GetNewOrderDtlPostProcessingDirective_test_5F34851085F74BEAA39032AE656596B6.A001_CustomCodeAction()
at Epicor.Customization.Bpm.BO.GetNewOrderDtlPostProcessingDirective_test_5F34851085F74BEAA39032AE656596B6.ExecuteCore(Int32 step)
at Epicor.Customization.Bpm.DirectiveBase2.Execute() in C:\_releases\ICE\ICE4.2.100.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 330 at Epicor.Customization.Bpm.DirectiveBase2.Execute(TParam parameters) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 222
Client Stack Trace
at Ice.Cloud.ProxyBase1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer) at Ice.Cloud.ProxyBase1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Erp.Proxy.BO.SalesOrderImpl.GetNewOrderDtl(SalesOrderDataSet ds, Int32 orderNum)
at Erp.Adapters.SalesOrderAdapter.GetNewOrderDtl(Int32 orderNum)
at Erp.UI.App.SalesOrderEntry.Transaction.GetNewOrderDtl()
Inner Exception
Object reference not set to an instance of an object.
Yeah it was a quick one off without null checks. I’ll see if I can help later or maybe someone will come along with guidance on how to do it with widgets.
This basically the same as what @klincecum did in widgets. It does require the same type of C# statement, but in an expression, so you still need to know how to query for the data. I used a generic comment on customer since I don’t have your field. This is an intrans data directive and passed syntax,checking, but has not been tested.