You need to sign in to do that
Don't have an account?
ckellie
Custom Button Javascript
How do I add three buttons on a javascript alert driven by a custom button? In my use case, I want to notify the user that not all data is entered on the opportunity page, but give the user the option to continue create a quote without the data, or return to the opportunity to add the information.
Below is the custom button:
How do I add two buttons to the alert?
Below is the custom button:
REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT('/soap/ajax/29.0/apex.js')} var result = sforce.connection.query("SELECT id, opportunityid, role from OpportunityContactRole where opportunityid = '{!Opportunity.Id}' and role='Technical Contact'"); var records = result.getArray("records"); var error1string = "Error:\n"; var error1found = false; if(!records[0]==null) { error1string += "The technical contact is not listed on the Opportunity nor will be listed on the budget proposal. Please add the technical contact to contact roles."; error1found = true; } if(records[0]==null) { alert("The technical contact is not listed on the Opportunity nor will be listed on the budget proposal. Do you want to continue to create the quote or do you want to add the technical contact?"); window.location = "{!URLFOR($Action.Opportunity.View,Opportunity.Id)}"; } else { /apex/QuoteNotification?oppid={!Opportunity.Id}&Type="B"&Rec="Budget Quote" }
How do I add two buttons to the alert?
there is a app for this on appexchange you can download and configure it.
If the app doesn’t solve the purpose it is very easy to build also
Step 1: - Create a VF page with standard controller Opportunity put it into the page layout hidden. Most of the magic will happen there.
Step 2 :- Create a button with
All Answers
there is a app for this on appexchange you can download and configure it.
If the app doesn’t solve the purpose it is very easy to build also
Step 1: - Create a VF page with standard controller Opportunity put it into the page layout hidden. Most of the magic will happen there.
Step 2 :- Create a button with