Skip to main content
Question

Api Button to Change status and then add task

  • May 13, 2020
  • 0 replies
  • 15 views

Hello All.

I am trying to make a button that changes the status of a record and then adds a record to the tasks table in edit mode below is the code that i have used. It is changing the status but not redirecting to the tasks record:

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=xxxxxxxxxxxxxxxxxxx" &
"&_fid_32=Call Back" &
"&rdr=" &
URLRoot() & "db/" & [_DBID_TASKS] & "?a=API_GenAddRecordForm"
& "&_fid_10=" &URLEncode(ToText(User()))
& "&_fid_15=" & URLEncode("Sales")
& "&_fid_8=" & URLEncode("Call Back")
& "&_fid_14=" & URLEncode ([Phone Number])
& "&z=" & "Rurl()"

------------------------------
Benjamin Brooks
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
You have to do successive API calls like this

var text EDIT = 
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=xxxxxxxxxxxxxxxxxxx" &
"&_fid_32=Call Back";

var text Add = 
URLRoot() & "db/" & [_DBID_TASKS] & "?a=API_GenAddRecordForm"
& "&_fid_10=" &URLEncode(ToText(User()))
& "&_fid_15=" & URLEncode("Sales")
& "&_fid_8=" & URLEncode("Call Back")
& "&_fid_14=" & URLEncode ([Phone Number])
& "&z=" & "Rurl()";

$Add
& "&rdr=" & URLEncode($Add)

------------------------------

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------