Complete Button Not working

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I'm trying to make a button that changes the status of a task to completed.  Below is the formula I'm using and it:


1. opens the task in view mode

2. does not change the status field

3. does not return to the report I'm using the button on

var text URLONE = URLRoot() & "db/" & Dbid() & "?act=EditRecord&rid=" & [Task ID]

& "&_fid_12=" & URLEncode("Completed");

var text URLTWO= URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Task ID];

$URLONE & "&rdr=" & URLEncode($URLTWO)

Photo of Daniel

Daniel

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,670 Points 50k badge 2x thumb
The problem is that the

?act=EditRecord&rid=

needs to be

?act=API_EditRecord&rid=.....

You can comment out the  
 // $URLONE & "&rdr=" & URLEncode($URLTWO)

 and just do

$URLONE

to get that working and go back to get them both working in sequence.
Photo of Daniel

Daniel

  • 0 Points
I think because I'm working with a basic QB account I'm getting an error saying API calls are not supported on this account.

var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Task ID]  

& "&_fid_12=" & URLEncode("Completed");

var text URLTWO= URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Task ID];

$URLONE
//$URLONE & "&rdr=" & URLEncode($URLTWO)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,670 Points 50k badge 2x thumb
Yes, the "Essentials" level account does not permit APIs to be used.  :(
Photo of Ruby

Ruby

  • 0 Points
But there should be a way to do this with the Essentials account, no?  After all I can use a button to add a record using an API Call...and the above formula doesn't return an error, it just doesn't change the status.
Photo of Ruby

Ruby

  • 0 Points
This formula works to add a record   URLRoot() & "db/" & [_DBID_TIME_CARDS] & "?a=API_GenAddRecordForm&_fid_18=" & URLEncode ([Task ID])& "&z=" & Rurl()
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,670 Points 50k badge 2x thumb
It is 99% true that the Essentials account does not permit the use of API's. The API to add a child record that you posted is the one exception, because being able to add children is "Essential", since Relationships are supported in Essentials.