0

I need to check a CB on an oppty, when any of it's products are of a certain character.

Our products have a CB named: 3D

If an oppty, has any such 3D product, I want/need to check the CB: is_3D - on the oppty

My first thought was to use a workflow and field update - but that fails since I can't have any criteria, and the product 3D field does not come to effect here. I need that the update will be both ways. so, if I remove the last 3D product from the oppty, the CB is unchecked. (As Girbot mentioned, the workflow on OpportunityProduct does work)

enter image description here

Another thought is to use a trigger (which is a valid option) - on save/edit - if exists 3D product - CB = true. (here needs to make sure that I don't accidentally remove a checked sign if delete/remove an oppty - can become a real issue)

I am looking for alternate ways if possible?

3
  • 1
    I don't understand why you can't use a workflow rule on OpportunityProduct, wouldn't the criteria be something like: Product2.CustomCD__c = True (assuming the CB is on Product2 and not OpportunityLineItem).
    – Girbot
    Commented Nov 10, 2014 at 9:37
  • thanks, that solves one problem, post as answer so I can vote up, but this does not work for the complete +/- 3D product.
    – Saariko
    Commented Nov 10, 2014 at 10:15
  • 1
    Sorry I don't under the +/- bit (Monday morning). Do you need the Opty.CB to be unchecked when they no matching line items? Maybe you want to look at a roll up summary field on Opportunity (using the same criteria as the comment above) then a custom CB formula on Opportunity. So if RSF > 0 = True?
    – Girbot
    Commented Nov 10, 2014 at 10:38

1 Answer 1

1

I think this approach would work. I'm assuming the 3D checkbox is on Product2.

You could add a formula CB or a custom CB with a workflow rule on OpportunityLineItem creation to be checked when Product2.CB = True, for demo purposes called olicb__c

Then add a roll up summary field on the Opportunity for OpportunityProrducts where olicb__c = True

You will now have the count of the OLIs whereolicb__c = True. From here you may be happy with just the count showing, or you could add another check box formula on Opportunity like rsf__c > 0 = True

There is a potential limitation to this and that is if you need to fire anything else off the checkbox formula on the Opportunity...as a formula field cannot trigger a workflow rule off on it's own.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .