function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
go_bear_2001go_bear_2001 

Display Win/Loss Analysis when Opportunity Stage is Set to Won or Lost

 

hi all,

 

I have this requirement and wondering as if anyone might share some of your opinions.  I need to enforce users to input a very detail Win/Loss reasons and Win/Loss Details when their opportunity are set to Won or Lost.  Only When an opportunity stage is set to Won or Lost, I need a way to display these 2 Win/Loss sections on the Opportunity Edit page which enforces users to specify its reasons and details:

-------------------------

Win/Loss Reasons:  (Checkboxes for these)

Competitive Price Bankruptcy

Specification  Quality

-------------------------

Win/Loss Details    (Drop-down selection for these)

Price Difference

Technology

Features

 

One approach is to pop out a Visualforce page which have the 2 Win/Loss sections after users click Save on Opportunity and the Opportunity Stage is Won or Loss.  However, I don't think I can override the Save button behavior there. 

 

I guess one solution is probably writing a VF page to override the Edit button on Opportunity.  Then,I can put event=onchange on Opportunity Stage and force a page refresh if Opportunity Stage is changed to Won/Loss.  However, overriding the entire Edit page on Opportunity might be a tedious task.

 

anybody has any simpler idea on achieving this?

 

thanks,

Klein 

 

 

Jeremy.NottinghJeremy.Nottingh

Aside from recreating the entire detail page and related lists in Visualforce, you could consider changing the way users mark an Opportunity Closed.

 

Don't allow users to select Closed Won from the detail page, then create 1 or two new Detail Buttons at the top (called Close Won and Close Lost or whatever). This/these buttons will go to a Visualforce page that marks it Closed Won and also requires your analysis fields.

 

Of course, this requires the ability to change user behavior slightly. If this won't work, you might be back to rebuilding the detail.

 

Jeremy

amar joshiamar joshi

Hi all,

 

well you don't need to write other then validation rule 

 

 

AND(
OR( ISPICKVAL(StageName  ,"FOF - Finalized in our Favor"), 
ISPICKVAL(StageName ,"LOC - Lost to Competitor") ),
Exten__Win_Lost_Description__c="",Exten__Advance_Taken__c=FALSE,ISPICKVAL(Exten__Order_Type__c,""))

 

AND(OR( ISPICKVAL(Field API name  ,"Value1"), ISPICKVAL(Field API name  ,"Value2") ),Competitive_Price_Bankruptcy__C="FALSE",Specification _Quality__C="FALSE",

ISPICKVAL(Win_Loss_Details__C,""))

go_bear_2001go_bear_2001

 

thanks Amar,

 

 

For the validation approach, the problem I have is that there is too much info. and the detail page looks crowded if I put the entire Win/Loss analysis fields there.  There are 10+ fields we want to capture regarding Win/Loss analysis and we have to make them all visible on the page if we write any validation.  

 

Ideally, we want to open up a wizard page of some sort when users slick to change an opportunity stage, but this approach would require us to override the entire Edit page.


amar joshi wrote:

Hi all,

 

well you don't need to write other then validation rule 

 

 

AND(
OR( ISPICKVAL(StageName  ,"FOF - Finalized in our Favor"), 
ISPICKVAL(StageName ,"LOC - Lost to Competitor") ),
Exten__Win_Lost_Description__c="",Exten__Advance_Taken__c=FALSE,ISPICKVAL(Exten__Order_Type__c,""))

 

AND(OR( ISPICKVAL(Field API name  ,"Value1"), ISPICKVAL(Field API name  ,"Value2") ),Competitive_Price_Bankruptcy__C="FALSE",Specification _Quality__C="FALSE",

ISPICKVAL(Win_Loss_Details__C,""))


 

 

Klein

go_bear_2001go_bear_2001

thanks Jeremy.

 

I think it's a good idea.  Creating another button to do Win/Loss analysis and disallow users to set Opportunity stage on the EDIT page.  My ideal solution is to pop out a wizard page which walks users through the Win/Loss analysis sections as soon as they set/switch the opportunity stage, but I know it's hard to do this way unless I have to override the edit page on Opportunity.

 

Klein