Forum Discussion

AlexGale's avatar
AlexGale
Qrew Captain
7 years ago

Use API_EditRecord without refreshing page or navigating away

I'm using a formula URL field button to edit records. The way I want to use that field is on an embedded report on another table. I've been making use of the following formula for ease of use:

var text url = API_EditRecord call of some sort

javascript:$.get('" & $url & "',function(){location.reload();});" & "void(0);

This refreshes the page on click, which is nice as it even displays the change immediately.

However, I recently put the embedded report in a different tab on the form. Now, refreshing the page brings the user back to the leftmost tab, which is annoying.

Is there a way to set it up so that users can click the button and have the API call go through while staying on the current page and tab?

Ideally, we would also be able to see the change on the embedded report as if the page was refreshed, but that's not required. 

Thank you
  • No problem,

    use this javascript instead  Just edit those words for the pop up.  It is a quiet green fade away pop up for 5000 milliseconds, ie 5 seconds.


    "javascript:" &
    "$.get('" & 
    $url & 
    "',function(){" &
    "$.jGrowl('This Item has been put on PO CANCEL snooze', {life: 5000, theme: 'jGrowl-green'});" &
    "});" &
    "void(0);"
    • AlexGale's avatar
      AlexGale
      Qrew Captain
      Oh that's perfect, thanks. I like that it gives feedback so the user knows their change has gone through even though the change doesn't immediately show up