0

If a user is on standard edit page of an object,is it possible to show a pop-up at regular intervals let's say 5 mins to remind users to save the record.

So far,

I have created custom edit button and executing javascript

window.open('/{!Study_CELG_IPS__c.Id}/e');

setTimeout(myFunction, 3000);

function myFunction() { alert('Hello'); }

this is opening edit page in new tab and pop-up is showing after 3s but in detail page tab.

If I use window.open('/{!Study_CELG_IPS__c.Id}/e','_self'); then pop-up is not working.

newbiesalesforce
  • 71
  • 1
  • 2
  • 6
  • do you get any javascript error in the console when inspecting the page? – Guy Clairbois Sep 21 '16 at 10:10
  • There was no error displayed,on clicking custom Edit button,it simply opened edit page layout and it did not invoked any pop-up after 3s. – newbiesalesforce Sep 21 '16 at 10:13
  • This is a javascript issue. The script will run on the page where it was called. You might want to check javascript forums for possible solutions (I'm not an expert), e.g. http://stackoverflow.com/questions/17043887/how-to-execute-javascript-jquery-on-a-newly-opened-popup-screen and http://stackoverflow.com/questions/3030859/detecting-the-onload-event-of-a-window-opened-with-window-open/3030893#3030893 – Guy Clairbois Sep 21 '16 at 10:26

1 Answers1

0

This is not possible using any of the currently (sept '16) available Salesforce technologies.

You could do it with a javascript workaround as described here: End of javascript sidebar workarounds? That's definitely not for newbies, though..

My advise would be to educate your end users to not forget to save.. Or you could put up a warning message in a formula field, and put that at the top of the page layout (ugly, though).

Guy Clairbois
  • 10,634
  • 31
  • 49