Hi,
We have a custom workflow on Sales order form. The requirement is that when a sales order status is set to approved, the sales order type should be changed to Sales order from Journal.
If we use the doupdate method of sales line to change the type, it is getting changed but since the others methods are not getting called, the inventrans is not getting created for those lines, if we use the update method, inventtrans is getting created but the unit price in sales line is getting changed to zero.
Also, one thing I've noticed is that sales line history is also not there in the saleslinehistory table for the approved sales order.
May I know if I'm missing anything in this case.
Hi Dynamics noob,
This is a long time ago for me that I looked into this field. I thought the field value has a reference to the table PriceDiscChangePolicy. You can check what table and then what would be the best value to use to prevent having the price or discount overwritten.
Hi Andre,
Thanks for the reply.
Yes, approving and automating is a part of customization.
On further analysis, we've observed that the unit price is getting removed due to the change in sales line field 'ManualEntryChangePolicy'. If the field contains value '5637144576' , then it works fine, otherwise the unit price gets removed to zero while converting from journal to sales order.
While we're trying to figure out the actual cause of getting this value removed, could you please share some information on use of this field and can we restore its value to '5637144576' ?
This field has a relation with the PriceDiscChangePolicy table, could you please suggest what should we do in this case and how will it impact the system if we restore the same value (before removal) in this field.
Thanks
Hi Dynamics Noob,
I do assume this approval and automating the sales order type is a customization? Have you checked what happens with the price when you change the type manually? I would recommend checking what exact logic is being called when you change the type. Then you can call that logic before the doupdate.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156