A user enters the quantity of widgets that they produced. They hit the save button. The production data is stored in table separate from the widget table. Once the user clicks save, I want the BO to update the On Hand total of the widget in the widget table. I am thinking that I would place some code in the AfterSave() method to make this happen. Here's the rub...what if the user entered the wrong quantity (not that this ever happens--I am just doing some just-in-case type of analysis here  ? The user finds their production data entry and clicks edit, then proceeds to change the quantity and clicks save. Now, what is the best way of handling this in order to update the widget table with the difference in quantity?
I have some ideas from previous non-SF days, but is there a good SF way to do this?
Thanks,Bill
My goal is closer. I am adding a field into my shipments table which will take care of some quantity conversions for me. That is the most complicated portion of my query, so I thought I would relegate it to the save procedure of the BO. I'd rather have the intricate calculation done as the row is being saved than on each row during an aggregate query. With that in place (and it will be done soon...finishing up some testing), the aggregate query speed drops to 1-2 seconds. That is quite acceptable.
I appreciate everyone's input on this. I am grateful that there are folks out there who are willing to share their expertise. And, to provide simple encouragement on a task that is frustrating at times.
Thanks!!Bill