Discussions

Expand all | Collapse all

Use API_EditRecord without refreshing page or navigating away

  • 1.  Use API_EditRecord without refreshing page or navigating away

    Bronze
    Contributor
    Posted 11-15-2018 20:53
    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


  • 2.  RE: Use API_EditRecord without refreshing page or navigating away

    Posted 11-15-2018 21:07
    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);"


  • 3.  RE: Use API_EditRecord without refreshing page or navigating away

    Bronze
    Contributor
    Posted 11-15-2018 21:12
    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