Discussions

Expand all | Collapse all

Api Button to Change status and then add task

  • 1.  Api Button to Change status and then add task

    Posted 05-13-2020 14:24
    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
    ------------------------------


  • 2.  RE: Api Button to Change status and then add task

    Posted 05-13-2020 14:27
    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
    ------------------------------



  • 3.  RE: Api Button to Change status and then add task

    Posted 05-13-2020 14:29
    Thank you Mark I am working on those variable tags to figure out when to use them !

    ------------------------------
    Benjamin Brooks
    ------------------------------