QuickBaseJunkie
Qrew Legend
7 years agoRe: Refresh parent record after child is created...
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);" &
"});"
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);" &
"});"