You need to sign in to do that
Don't have an account?
Mauricio Oliveira
Can't reproduce UI behavior on test: update on quotelineitem updates quote too
Hi there,
I have the following situation:
- My Quote has a field that is updated on its afterUpdate trigger, based on a calculation involving its QuoteLineItems
- If I simply update one of the QuoteLineItems via UI (edit item, change value, save), it also does an update on the Quote, firing its triggers which ends up calculating the value of the field I mentioned above, works fine.
- However, If I just make an 'update item' on my test, it does not update the Quote, which ends up not calculating the mentioned field
I can't see a reason why the Quote is also being updated through the UI. So, before going deeper in debug logs, I'm just wandering if there is something very obvious that I might be missing. Any thoughts?
Thanks.
I have the following situation:
- My Quote has a field that is updated on its afterUpdate trigger, based on a calculation involving its QuoteLineItems
- If I simply update one of the QuoteLineItems via UI (edit item, change value, save), it also does an update on the Quote, firing its triggers which ends up calculating the value of the field I mentioned above, works fine.
- However, If I just make an 'update item' on my test, it does not update the Quote, which ends up not calculating the mentioned field
I can't see a reason why the Quote is also being updated through the UI. So, before going deeper in debug logs, I'm just wandering if there is something very obvious that I might be missing. Any thoughts?
Thanks.
All Answers
I was suspecting that this was a standard Salesforce behavior, but I couldn't find this documented anywhere. My concern is to be able to reproduce in tests the exact behavior of UI changes. I guess I will just add an 'update quote' to my tests right now, but it would be really nice to be sure that we are correct assuming that is expected behavior to update even if without roll-up summary fields.
Thanks again.