I have a table of Approval records (we’re using the Advanced Approvals managed package), where there could be many for a single Quote Line. Reason being that the users need to be able to action on that particular record…and so that they can see all the Approvals that are required before all the Quote Lines (and thus the whole Quote) are “fully approved”.
However, some of the calculation/updates really should be done at the Quote Line level - such as cost/margin calculations.
What I want to be able to do:
- Use a Table of Approvals
- Field on Approval (whether UI-only or a proper field, doesn’t really matter) that is editable by product managers called “Target Margin”
- When Target Margin is updated/record is saved (the PMs might “mess around” with these numbers on multiple records based on circumstances), update an identical field on the Quote Line
- On the Quote Line, have a formula field to reverse engineer a “Target Discount”, so that the Sales user can see, “Oh, the PM is advising me to change the discount to 20%”…
- …because Sales doesn’t see the Approval records in their “working page” (a VF page from CPQ managed package), which is why I need the value to “work its way up” to the Quote Line, so to speak
I found this post from back in 2015, but I’m admittedly not well-versed (read: at all) with javascript, and I’m also not sure how to translate the code to update a field that’s not even on the same model.
Is this possible?