You need to sign in to do that
Don't have an account?
pjbarbats22
Trigger that automatically adds opp products based on other Products chosen
We want to automatically add Maintenance Products to our Opportunity Products when a License is chosen. We dont want sales to have to click on both products, but always have the maintenance product get inherited from the license product. I am told that apex trigger ios only way for this to happen.
Yes you are correct. You would need a trigger on the opportunity product that checked the type of product (however you assign in). If it is a License the trigger would have to create a new product and insert it.
Here is generally what you want to do
This is just the basic structure and I suspect that the finished product would be way more complicated because I am sure that you have multiple products with a 'license' type and may have to pick a 'maintenance' product based on some criteria, but this should get you started.