Loading

Make Products required on Opportunities

게시 일자: Aug 21, 2024
상세 설명

Organizations that have purchased the Products module can make Products required on Opportunities.

솔루션


To make Products required on Opportunities, log in as a system administrator and follow the instructions below:
 

  1. Navigate to Opportunity Settings:

In Salesforce Classic: Setup | Customize | Opportunities | Opportunity Settings
In Lightning Experience: Setup | Feature Settings | Sales | Opportunities | Opportunity Settings  

 

  1. Select Prompt users to add products to Opportunities.
  2. Click Save.

 

In certain situations, this setting can be overridden by user behavior, which may result in Opportunities without related Products. This is expected and can happen in any of the following situations:

 

  1. A Lead is converted and an Opportunity is created at the time of conversion. The User is not brought to the "Product Selection" screen for the Opportunity.
  2. An Opportunity is cloned without Products. The new Opportunity is created without any Products unless the Save & Add Products option is used to add them.
  3. A User creates a new Opportunity and clicks Save & Add Product. On the Product Selection screen, the User clicks Cancel and is brought back to the Opportunity, which will be created without Products.
  4. A User creates a new Opportunity and clicks Save & Add Product. The User then closes the browser window or clicks the Back button in the browser. The Opportunity has been saved in the system, but the User has manipulated browser behavior to workaround the system design.
The fourth situation above cannot be controlled by Salesforce since the User is working around the logic structure of the application.

This setting can also be overridden in the following situation:
 
  1. The Opportunity 'New' button is overridden with a component that implements force:createRecord
 
Salesforce recommends using the following workaround to "enforce" Product entry on each Opportunity: simply make the Amount field as read-only on Opportunities. Products will have to be entered on an Opportunity in order for the Amount field to be populated with a value. Review Field Access.
 
 
  1. To make Products required via Validation Rules, use the field name "Has Line Item" in the formula. Below are sample formulas to use:
 

In Salesforce Classic: Setup | Customize | Opportunities | Validation Rules
In Lightning Experience: Setup | Object Manager | Opportunity | Validation Rules

 

Sample formula to use for multiple Stages:
 

AND(
OR(
ISPICKVAL(StageName,"Needs Analysis"),
ISPICKVAL(StageName,"Qualified"),
ISPICKVAL(StageName,"Proposal Submitted")),
HasOpportunityLineItem = FALSE
)

 

Sample formula to use when only a certain Stage is reached:
 

AND(
ISPICKVAL(StageName,"Needs Analysis"),
HasOpportunityLineItem = FALSE
)

 

Note: This validation rule only works if an Opportunity has a Price Book added.

Knowledge 기사 번호

000384448

 
로드 중
Salesforce Help | Article