You need to sign in to do that
Don't have an account?
Display warning on button click
Hi,
I have a custom button that is used to generate an order from a Quote. Whenever that is clicked, I want to display an error msg saying this will "create a single order for the Product. do you want to continue?"
How can I do that? Right now the custom button goes like this: /flow/Quote_to_Order?QuoteID={!Quote.Id}&retURL=/{!Quote.Id}
I have a custom button that is used to generate an order from a Quote. Whenever that is clicked, I want to display an error msg saying this will "create a single order for the Product. do you want to continue?"
How can I do that? Right now the custom button goes like this: /flow/Quote_to_Order?QuoteID={!Quote.Id}&retURL=/{!Quote.Id}
Please use javascript confirm box method:
Include javascript library first, then try below code
var cont =confirm("Have you considered amount?") if (cont == true) { /flow/Quote_to_Order?QuoteID={!Quote.Id}&retURL=/{!Quote.Id}; } else if(cont == false) { return false; }
Hope this will solve your problem
Thanks
Thanks a lot for your response. Right now when I put this piece of code into my button, it says URL no longer exists..
This might be a silly question to ask but where and how can I include the javascript library?
Thanks,
Avinash
Thanks,
Gaurav
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
var agree = confirm("Are you sure you want to go ahead?");
var result = sforce.apex.execute({/flow/Quote_to_Order?QuoteID={!Quote.Id}&retURL=/{!Quote.Id}; })
alert(result);
}
Thanks,
Avinash
Use below code for your error :
Thanks.