JordanBeatty1
8 years agoQrew Captain
Can't seem to get redirect to work after API Call
I'm using the following:
var date RightNow = Today();
var text Close = "CLOSED";
var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord"
& "&rid=" & [Record ID#]
& "&_fid_18=" & $Close
& "&_fid_23=" & $RightNow;
var text URLTWO = URLRoot() & "db/" & [_DBID_ACTIVITY_LOG_DAVE] & "?a=API_AddRecord"
& "&_fid_47=" &URLEncode ([Record ID#])
& "&_fid_50=" &URLEncode([Company Name (ref)])
& "&_fid_97=" &URLEncode([User #])
& "&_fid_31=" &URLEncode([Now])
& "&_fid_22=" &URLEncode("Stuff")
& "&_fid_11=" &URLEncode("More Stuff")
& "&_fid_12=" &URLEncode("0.05");
var text URLTHREE = URLRoot() & "db/" & Dbid() & "a=dr&rid" & [Record ID#];
$URLONE
&"&rdr=" & URLEncode($URLTWO)
&URLEncode("&rdr="&URLEncode($URLTHREE))Although I can't seem to get the third URL to work so I stay on the same page. The actual use of the button is that, you click it and it updates the current parent records you are in. Creates the cookie cutter child record, then I would like to remain in the parent record.