In this case I am using UD20 for an approval process. Once something needs approval a bpm adds a row to UD20. When the request is either approved or unapproved, and it has updated the specific table, I have a bpm delete the row. Here is my question, Is the below code I am using the best way to achieve this?
In another customization I want to do a similar thing with OHOrderHedMsc rows. In that case I want to make sure a specific volume discount charge applies to said order and make sure no other volume discount charges exist on said order. I don’t have a code snippet for that yet, as I really want to make sure I understand the correct way to go about it.
I’d really appreciate anyone’s advice, feedback and ideas. Thanks.
Since it’s a UD table you are probably okay doing it this way, but typically you want to call the BO’s Update method and pass in a RowMod = “D”. You should be able to find some code for that on this site.
Have you run a trace through the application? That is going to be the best way to find the methods you need. You’ll just have to mentally filter out the noise of some UI specific methods that get called.
Ice Tools documentation seems to just elude to making sure the data that is currently in the row(s) you have modified, abides by the underlying table rules/required fields/formats before committing the data. The method/function is available as something to call for that class/object. In this case I’m assuming that Db.Validate() has the ability to pick up the context of the rows used that way you don’t have to specify and say something like: