Forum Discussion
JordanBeatty1
8 years agoQrew Captain
So now I have:
The page is reloading but now neither of the API calls are working
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");
"javascript:" &
"location.reload(true);" &
"$.get('" &
$URLONE
&"&rdr=" & URLEncode($URLTWO) &
"');" &
"void(0);"
The page is reloading but now neither of the API calls are working
- MCFNeil8 years agoQrew CaptainI'm jumping into a meeting, but a quick idea.
try adding an app token
&apptoken=xxxxxxx
Also try combining the two URLs before inserting to the javascript;
var text URLMaster=$URLONE&"&rdr=" & URLEncode($URLTWO); - MCFNeil8 years agoQrew CaptainThe reason I like going the 'refresh' route, rather and the rdr to a specific page, is it allows you to use the button on reports or dashboards. So you can easily perform the action, and continue where you left off.
- QuickBaseCoachD8 years agoQrew CaptainMatthew
I agree that the refresh is better but I have always struggled with getting a stupid simple syntax to work when having multiple nested redirects.
Have you tested your code above? I will give it a try when I get a chance.