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
Jules Faligot 9Jules Faligot 9 

Add a "Are you sure?" pop up to the Send Email button on Case's Feed View

Hi All,

I am trying to add a confirmation pop up to the standard chatter action "Send Email" in the case feed based layout.
I have replaced the standard send email button by my button but am not able to wait for confirmation before the email is actually sent.
User-added image
My button executes the following Javascript: confirm("Are you sure you want to send this email?");

Do you know how I could force the user to confirm before the email is sent?

Thanks a lot for your help!

Jules
 
RbnRbn
Try out with: (window.confirm('Are you sure you want to send this email?'))

rgrds,
Rabi
Jules Faligot 9Jules Faligot 9
Thanks a lot Rabindranath, but it seems that it behaves exactly the same: first send the email and then ask for confirmation :(User-added image
Any idea how I can wait for the user's confirmation before shooting the email?
RbnRbn
hi Jules,

Can you please paste the whole snippet of code of your custom Button.

rgrds,
Rabi
Jules Faligot 9Jules Faligot 9
Hi Rabindranath,

That's actually all there is in the button which makes the fact that the email is sent anyway quite strange...

Best regards,

Jules
Cindy JulioCindy Julio

Hi Jules,

Were you able to fix the issue? I'm also encountering this.

Thanks,

Cindy

Jules Faligot 9Jules Faligot 9
Unfortunatly no.

The quick action uses its own standard controller which is called before anything you can implement, be it at the button level (javascript) or in a vfp called when clicking on the button.

The workaround woud be to re implement the quick action as a vfp with its own buttons and controller and then you would able to add your pop up (way to costly for us).

Hope this somehow helps,

Jules