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
surekha Ksurekha K 

I want to show the popup window on opportunity standard page based on particular onchange picklist value.

Hi All,

We have a requirement to display popup window on the edit page(before click on save button) on opportunity Standard page based on selection of particular picklist value.

Can anyone aware on this requirement.Please sugest me how to overcome from this scenario.

Many Thanks in Advance,

Regards,
Surekha
gautam_singhgautam_singh
Hi Surekha,

I have been through this requirement. I had to override the Edit button for this functionality & created a custom button called Edit Worksheet. My requirement was to let the user edit the record only if there is worksheet associated else pop up a message explaining that there is no worksheet associated.

Here is the Code Excerpt for it, Hope it works for your scenario.

All you need to do is create a new button & customize the code below as per your need.
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")};
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")};
var isAccessible = sforce.apex.execute("CheckWorksheetAccess","checkAccessible",{});
if(isAccessible == "true"){
var serviceContract = "{!Quote.Service_ContractId__c}";
var quoteLocked = "{!Quote.Locked__c}";
var recType = "{!Quote.RecordType}";

if(serviceContract == '' || serviceContract == null){
alert('Worksheet does not exist for this Quote');
}else if(quoteLocked!=null && quoteLocked==true){
alert('Quote has been locked, you can not edit Worksheet.');
}else if(recType=='Read Only Record Type'){
alert('Quote is of Read Only Record Type, you can not edit Worksheet');
}else{
window.location="/apex/serviceContractsPage?servid={!Quote.Service_ContractId__c }&area=frmQuote&QuoteId={!Quote.Id}";
}
}else{
alert("You do not have permission to edit worksheet, please contact your administrator for assistance.");
}

Important :

If this is what you where looking for then please mark it as a solution for others benefits.

Thank You
surekha Ksurekha K
Hi Gautam,

Thanks for your email,

Edit Page means UI page...
I dont want to click on any button i just want to popup on onchage functionality the picklist value.
For  Example:
i have a field called Phase(Picklist type):(values like qualified Lead,Opportunity Identified,Proposal Stage,Shortlisted,Negotiation,Order Won).

The phase is changed from Proposal Stage to Shortlisted- one alert box will open before clicking on save or any custom buttom..

Thanks & Regards,
Surekha

shashi lad 4shashi lad 4
Hi
I think only way this is possible is using a custom visualforce page and define onclick etc  javascript action on the picklist field. There is no onchange or event can be specified on standard page fields. You may want to think about javascript/jquery but its lot of effort to achieve it and i'm not sure if its worth it. I'm little bit confused about requirement too since user filled out all the details and when you press save it can still show popup and information we need to communicate to user which is kind of standard way of salesforce. What is a specific requirement that it has to show when picklist value is changed? if some kind of alert or warning or details that can't be done on save ?? just wondering if you don't mind.

thanks
shashi
hanumanth rao Naiduhanumanth rao Naidu
HI Surekha,

i have also having same requirement , if it is already done from you can  you please post the answer  and how to do that....or email me rao.gecap@gmail.com.......its very urgnt

Thanks in Advance
Sarthak Bajaj 14Sarthak Bajaj 14
Hi,
Did you get the solution for this issue?
I also have somewhat same functionality..
Satya Ranjan MohantySatya Ranjan Mohanty
Hi ,
I am also having same requirement  does any one got the solution fot this

Thanks in Advance