You need to sign in to do that
Don't have an account?
Michaela Grundman
Need help with preventing certain quote line items being chosen.
There are two products we have in our system (Customer Supplied Tires) and (Michelin Tire Upgrade). They are different products but should not be chosen on the same quote. I need a trigger (or something) that will allow our users to pick 1 or the other, but not both. If someone can help, please let me know and I will be happy to provide more detailed information.
Thank you -
MGrundman
Thank you -
MGrundman
In the triggers, you would need to create two map collection variables with the definition as Map<id,string>. One map to populate all the opportunity id and true or false based on the associated quote records that has 'Customer Supplied Tires.
The second map to populate all the opportunity id's and True or false based on the associated quote records that has Michelin Tire Upgrade.
Then you can loop through new quote collection and if the quote is 'Michelin Tire Upgrade, see if that Opportunity already has Customer Supplied Tire and vice versa.
Hope this helps !!
You can add custom text field on Product object e.g. Exclusive_Code__c. Put the same value in this field for these two products.
Create trigger for Opportunity Products on insert and update. In this trigger we are interesting on OpportunityLineItems with not empty Product2.Exclusive_Code__c. We have to query on the existing Opportunity Products and match Exclusive_Code__c. If values are the same we will add error to the record.