Skip to main content
Question

Refresh parent record after child is created...

  • July 28, 2018
  • 0 replies
  • 48 views

When adding child records via formula URL buttons on mobile, the child record count isn't updated unless the user manually refreshes the screen.  Is there a way to build the refresh into the Add Child Record button?

If you use the green plus button that comes with the embedded report on mobile then this isn't a problem.  However, if I have the user use that button, then I can't modify the formula URL.
This topic has been closed for replies.

QuickBaseJunkie
Forum|alt.badge.img+15
The code below will create a child record in the background (while populating two fields), then return to the current record in edit mode, followed by a refresh of the page. You'll just need to plug in your app specific values.

var text URLONE = URLRoot() & "db/" & [_DBID_CHILD_TABLE] &
"?a=API_AddRecord" &
"&_fid_6=FieldA" &
"&_fid_7=07/28/2018" &
"&_fid_8=" & [Record ID#];

var text URLTWO = URLEncode( URLRoot() & "db/" & Dbid() &
"?a=er&rid="& [Record ID#] );

"javascript:" &
"$.get('" & 
$URLONE & "&rdr=" & $URLTWO &
"',function(){" &
"location.reload(true);" &
"});"