Forum Discussion

AlexGale's avatar
AlexGale
Qrew Captain
5 years ago

Get around delete permissions with API call?

I want my users to be able to delete records from a certain table, but only in certain situations. Since they only ever view the records from a specific table, and there's no way to set up custom delete permissions, I thought that a way to do this might be to have a Formula - URL button that calls API_DeleteRecord, and use formula logic to have it only send the API call when certain conditions were true. 

Is there a way to allow users to click this button to delete the record even if they don't have delete permissions for the table? I've been looking at usertokens and tickets because those seem like they might help, but I don't know too much about that.

------------------------------
Thanks,
Alex
------------------------------

4 Replies

  • Great Question as you are close.

    So just setup an Automation.  Automations run under the permissions of whoever last created or edited the Automation.  

    Then depending on how fancy you want to get, you can just have a form rule to expose a checkbox field to delete the record or make a URL formula button to check a checkbox (where the URL formula will be null if the conditions are not met).

    Then the user triggers a "request deletion" type update and the Automation will do the delete.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • AlexGale's avatar
      AlexGale
      Qrew Captain
      Thanks Mark, that makes sense. In my case I'll use a checkbox to trigger the automation I think.

      ------------------------------
      Thanks,
      Alex
      ------------------------------
  • Hi Alex!

    I like Mark's suggestion, but here is another possible way of approaching it. Especially if there is the possibility of an erroneous deletion. 



    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------
    • AlexGale's avatar
      AlexGale
      Qrew Captain
      Hi Sharon, 

      I think that's a good idea, but I'm not actually worried about extraneous deletions in this specific case, because the table in question is just a join table. If something gets deleted, no information will be actually lost. Still, thanks for the suggestion! 

      Alex

      ------------------------------
      Thanks,
      Alex
      ------------------------------