Discussions

Expand all | Collapse all

Webhook to Delete Attachments - not actually deleting them

  • 1.  Webhook to Delete Attachments - not actually deleting them

    Posted 10-17-2019 10:50
      |   view attached
    Hey,

    I have a webhook set to be triggered when data changes in the table. The webhook deletes a set of attachments when something is checked. At first glance, everything seems to work and the pictures that were once in the attachment field don't show, but when I go to the revision history, it still shows that the picture is there and somehow there is a deleted placeholder as the current revision.  Ive attached a picture that shows this

    Here is my webhook code:
    HTTP method: POST
    Message format: XML
    Message header: QUICKBASE-ACTION    API-EDITRECORD
    Message body: 
    <qdbapi>
    <usertoken>%user.token.xxxxxxxxxxxxx.Jordan McAlister%</usertoken>
    <rid>[Record ID#]</rid>
    <field fid="30" filename="delete"></field>
    <field fid="31" filename="delete"></field>
    <field fid="32" filename="delete"></field>
    <field fid="33" filename="delete"></field>
    <field fid="34" filename="delete"></field>
    <field fid="420" filename="delete"></field>
    <field fid="421" filename="delete"></field>
    <field fid="422" filename="delete"></field>
    <field fid="423" filename="delete"></field>
    <field fid="424" filename="delete"></field>
    </qdbapi>



    ------------------------------
    Jordan McAlister
    ------------------------------


  • 2.  RE: Webhook to Delete Attachments - not actually deleting them

    Posted 10-17-2019 11:32
    I've found a way around this by making the attachment field only be allowed to hold 1 revision.

    ------------------------------
    Jordan McAlister
    ------------------------------



  • 3.  RE: Webhook to Delete Attachments - not actually deleting them

    Posted 10-18-2019 15:16
    That's exactly what I was going to suggest. The Webhook does delete it, as it is no longer the current revision of the file attachment.

    ------------------------------
    Ryan Stanford
    ------------------------------



  • 4.  RE: Webhook to Delete Attachments - not actually deleting them

    Posted 8 days ago
    This is a useful post thread.   Just a correction to the setup.
    Message header is correct with Key: QUICKBASE-ACTION   
    but the Action is API_EditRecord with an under score.



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