Forum Discussion

AlisonFisher1's avatar
AlisonFisher1
Qrew Trainee
2 years ago

Webhook to delete a file attachment

I created the webhook below to delete a file attachment when a checkbox is checked, but it only works for one record at a time. How do I modify this webhook so that it updates multiple records at a time when the checkbox is checked using grid edit? Thanks!

API_EditRecord

<qdbapi>
<udata>mydata</udata>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<rid>[record_id]</rid>
<field fid="[field_id]" filename="delete"></field>
</qdbapi>



------------------------------
Alison
------------------------------
  • think you just need to add the repeat markers, like this:

    %RepeatOn%
    <qdbapi>
    <udata>mydata</udata>
    <ticket>auth_ticket</ticket>
    <apptoken>app_token</apptoken>
    <rid>[record_id]</rid>
    <field fid="[field_id]" filename="delete"></field>
    </qdbapi>
    %RepeatOff%



    ------------------------------
    gary
    ------------------------------
    • AlisonFisher1's avatar
      AlisonFisher1
      Qrew Trainee

      Hi Gary - Thanks for the suggestion. I added the RepeatOn/Off inside the webhook as in below but it still only updates the first record checked (adding them where you suggested gave an error message).

      <qdbapi>
      <udata>mydata</udata>
      <ticket>auth_ticket</ticket>
      <apptoken>app_token</apptoken>

      %RepeatOn%
      <rid>[record_id]</rid>
      <field fid="[field_id]" filename="delete"></field>

      %RepeatOff%
      </qdbapi>



      ------------------------------
      Alison Fisher
      ------------------------------