KarthikSekhar
4 years agoQrew Trainee
Formula refresh button issue
I used to have a refresh button that when clicked will save the record and then open the record in edit mode. This button was using javascript below.
"<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Refresh</a>"
An alternative is to use below
var text rid = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;
"<a class=\"Vibrant Primary SaveBeforeNavigating\" data-replaceRid=\"true\" href=\"" & $url & "\">Refresh</a>"
But, the issue is when you are editing a child record that is embedded in the parent and do not make any changes to the parent record the browser displays a pop up that "your changes may not be saved". Is there any alternatives to prevent the browser from displaying the popup and automatically save and open the record in edit mode (without using javascript).
------------------------------
Karthik Sekhar
------------------------------
"<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Refresh</a>"
An alternative is to use below
var text rid = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;
"<a class=\"Vibrant Primary SaveBeforeNavigating\" data-replaceRid=\"true\" href=\"" & $url & "\">Refresh</a>"
But, the issue is when you are editing a child record that is embedded in the parent and do not make any changes to the parent record the browser displays a pop up that "your changes may not be saved". Is there any alternatives to prevent the browser from displaying the popup and automatically save and open the record in edit mode (without using javascript).
------------------------------
Karthik Sekhar
------------------------------