Forum Discussion
QuickBaseJunkie
Qrew Legend
7 years agoThe 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);" &
"});"
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);" &
"});"
QuickBaseJunkie
Qrew Legend
7 years agoI seem to get different and sometimes buggy behavior depending on what browser I use on my phone with my apps. What I notice is that it is opening a new window vs overwriting the current window, which is why when the child window closes the parent is not refreshed.
To me, this seems like a bug and not a feature. Have you told Quick Base about it?
Since you want to open the child record and edit it, have you considered adding a URL button to the child record that will save then redirect to the parent? You could end up with multiple windows open but at least the 'active' one will have the updated record count.
To me, this seems like a bug and not a feature. Have you told Quick Base about it?
Since you want to open the child record and edit it, have you considered adding a URL button to the child record that will save then redirect to the parent? You could end up with multiple windows open but at least the 'active' one will have the updated record count.