I was tasked with making the OrderDtl.LockPrice variable to be true when a new line is created, and I am having some issues doing it. I tried looking for something related to automatically setting a variable to be x when something is created, but I could not find anything.
To start, I made a new rule in Order Entry application studio. It successfully changes lockprice to be true all the time. However, this will force the lockprice to be true all the time, instead of having it be on by default and able to be toggled. Is there a way to edit this so it will only set LockPrice to be true when creating the line?
When that did not work, I went to data directives. I created the following BPM, but this does nothing at all. As shown in the screenshots below, I made a condition to check if the added row of OrderDtl.LockPrice is false, then change it to true. I made sure to try both added and updated row for both the widgets in the BPM, and nothing worked. Any idea what could be wrong with this?
It seems like you’re looking to have the “Lock Price” field set to true automatically when a new line is created, but still want to have the option to toggle it later if needed.
In this case, it will be easy to use Method Directive. There is a method called “GetNewOrderDtl” under SalesOrder Business Object. Use post-processing for this and directly use set field widget to assign value to true. With that, you won’t need any condition as well.