3

We've got several departments using Salesforce and while we'd like everyone to use products with opportunities we can't currently do this across the board. However, for the departments that do use products I'd like to have the users add products immediately after creating the opportunity. I can do this globally by checking the "Prompt users to add products to opportunities" in the Opportunity Settings section, but what I need to do is to only have specific users get prompted (based on either a user field or profile).

I've tried URL hacking this, but it doesn't appear the display of the "Save" vs. "Save and Add Products" buttons on the new opportunity page are controlled by parameters.

I know I can override the new button completely, but being unable to use page layouts to drive the fields visible on the new opportunity page layout is also a deal breaker (way too many record types and page layouts to handle).

Anyway have any suggestions for how to accomplish this?

2 Answers 2

4

What you can do is create a rollup summary on the Opportunity that counts the number of products that are added to the Opportunity. Then, with validation rules, you could prevent the progression of the Opportunity Stage to anything other than the default stage when that count field equals zero.

In your validation rule you can also check the $Profile and $User globals to restrict only certain profiles or User attributes.

2
  • Assuming Opportunity Amount is derived as a rollup of Product Amounts, you could also base it off the Amount rather than having to create a custom rollup summary. Dec 18, 2012 at 22:10
  • That'll work, but I'm trying to get them to do it immediately after creation (as it would happen with Save and Add Products). In other words I don't want to require them at some XXX stage, I won't to require them on create. Dec 19, 2012 at 21:42
2

You can approach it in two steps. 1. Create a workflow to send an email alert to the OWNER of the opportunity asking them to update the product details on the newly created opportunity. 2. Along with that, you can add a validation rule on OPPORTUNITY which would ensure that once the opportunity is created, no further changes whatsoever can be saved on the record until atleast 1 product is added to that opportunity. You can use the below formula in the validation rule. NOT(OR(ISNEW(), HasOpportunityLineItem)) Along with $PROFILE and $USER global variables you can restrict this to user set you want this feature for.

This would basically render your newly added opportunity useless until owner of the opportunity adds a product to it.

You must log in to answer this question.

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