Forum Discussion

JackWoods's avatar
JackWoods
Qrew Trainee
4 years ago

Kirk Magic Buttons - Close/Complete A Task Button

I've been working with Kirks magic Buttons and want to use the Complete Task Button. The button should ask if you're sure and then change the status and change the actual finish date to today. The actions seems to be working on the record but when I press the button it sends me to an error page and tells me nothing was changed (Even though it was). Please review the code below and help me with the errors. Attached is the error screen I get.

"javascript:if(confirm ('Are You Sure You Want To Close This Task?')){location.assign('/db/" & Dbid() & "?act=API_EditRecord&apptoken=bufgudqbtmxg26x78tdv7966f3&rid=" & [Task ID] & "&rdr=" &
URLEncode(URLEncode(URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=bufgudqbtmxg26x78tdv7966f3&rid=" & [Task ID] &
"&_fid_12=Completed" &
"&_fid_84=" & URLEncode(Today() &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Task ID]& ""))) &"')}")

------------------------------
Jack Woods
------------------------------

5 Replies

  • This worked for me.  Modify for your own field id's and change the [Record ID#] to your [Task ID#]

    "javascript:if(confirm ('Are You Sure You Want To Close This Task?')){location.assign('/db/" & Dbid()
    & "?act=API_EditRecord&apptoken=bufgudqbtmxg26x78tdv7966f3"
    & "&rid=" & [Record ID#]
    & "&_fid_63=Completed"
    & "&_fid_64=" & URLEncode(Today())

    & "&rdr=" & URLEncode(URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]))

    &"')}"

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JackWoods's avatar
      JackWoods
      Qrew Trainee
      that worked. Is it possible to do a second pop up after the function is done to say

      "the task has been complete"??

      Thank you,

      ------------------------------
      Jack Woods
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        I have no idea, but it seems overkill to me.  The user will land back on the record where they see the result of their click with the fields updated.  If you want to fancy it up, you can have a rich text formula field to display a check mark icon

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