We have a use case where we want the Make Direct checkbox to be False when a line/release is added to a sales order for a certain customer. Meaning it should always be shipped from stock.
The problem is, for this customer, we create the sales order from a quote, and the releases always come over as MakeDirect = True.
I’ve tried a Method Directive on Erp.BO.SalesOrder.CreateOrderFromQuote but still no luck setting the field. I also tried Erp.BO.SalesOrder.Update with the same results.
Unfortunately a Data Directive on OrderRel doesn’t work because the other BO’s aren’t triggered for Time Phase and some other processes.
@ewidjaja I see you made a post back in 2017 for the exact same topic, did you ever get this figured out?
Try using SalesOrder.MasterUpdate instead of Update.
Was this using an In-Tran directive or Standard? I would think that an In-Tran would do the job. If not, I would probably create a Standard Data Directive to invoke a Kinetic Function. In the function, call the SalesOrderSvc and use the ChangeMake( SalesOrderTableset ) method.
I’ll give the SalesOrder.MasterUpdate a try and see if that works for me.
Actually I was using a In-Tran Data Directive to test with. It does update the field but like I mentioned, Time Phase and some other things didn’t look right because some of the BO’s weren’t getting triggered.
Thanks for the suggestions! Hopefully the Method Update works otherwise I’ll try the Function.
We ended up doing this as a function that runs on a schedule before MRP using the Update business object. When you’re setting Make=False, also be sure to set the WarehouseCode value – we set it as the primary warehouse for that part – and RowMod=U
Awesome! Glad to hear you were able to get it working. I’ll give that a shot next but may have some follow up questions as I haven’t been able to create many functions yet. Thanks!
I had to make a slight change to the CustNum assignment because our CustID isn’t 1 to 1 with our CustNum and ran into small issue with a couple of the open lines not being a having a part master which causes it to error out. These were open lines for things added after the SO was converted from quote such as freight or tax. I’ll either have to add logic to only update parts that have Part Masters or change our business process to only use lines with Part Masters. Either way, once I closed these lines and put it on a schedule to run immediately the other lines were all Make Direct = FALSE. Time Phase looked good too!
If I ever make it to Insights, I’ll owe you a beer lol.