You need to sign in to do that
Don't have an account?
RaviVarma123
Page should be closed when cancel button is clicked
Hi,
I have a visualforce page where when a button is clicked, it opens the standard lead edit page in the new tab to create a lead. When I click on the cancel button, it redirects to the previous page. But, all I need is when we click on the cancel button, the tab should be closed. I'm stuck with it since couple of days. Can anyone of you take the initiation of sorting this out for me.
Thanks
RV
I have a visualforce page where when a button is clicked, it opens the standard lead edit page in the new tab to create a lead. When I click on the cancel button, it redirects to the previous page. But, all I need is when we click on the cancel button, the tab should be closed. I'm stuck with it since couple of days. Can anyone of you take the initiation of sorting this out for me.
Thanks
RV
you can refer this https://stackoverflow.com/questions/8921434/how-to-implement-cancel-functionality-in-a-visualforce-page
please mark the question as solved if this helps you
https://success.salesforce.com/answers?id=90630000000gmEtAAI
https://developer.salesforce.com/forums#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Developer_Forums&criteria=ALLQUESTIONS&id=9060G000000MVrtQAG
The following script has to be included in your VF:
<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script>
Then use this line to close the Quick Action window:
Sfdc.canvas.publisher.publish({ name: "publisher.close", payload:{ refresh: "true" }});
Doesn't work every time (at least on my machine), but it works often enough to be very useful.
Thanks to notmyf4ulty in StackExchange for this