Forum Discussion

RickPutnam's avatar
RickPutnam
Qrew Cadet
3 years ago

Restrict Add/Delete records based on field value (status)

Greetings,

I have an app that has an invoice approval workflow. Invoices can be of 3 different types. For two of the three invoice types, approvers need to be able edit but not add or delete line items. In the case of the third type, approvers need to be able to add, edit, and delete line items. Invoice Items are on a table with a child relationship to the Invoice table. I'd like to be able to provide a grid edit report on the Invoice Approval Form that would allow access to the line item records. Is there a way to allow items to be deleted from the grid when the parent invoice is one type but prevent deleting for the other two types?

Setting role-based Add/Delete/Edit table permissions seems only to apply to all records in the table. One is not able to allow only some records to be deleted based on type or other record specific data.

I suppose I could use a custom data rule to prevent deletion in those cases but that will make for a clumsy user experience. 

Thanks in advance for your assistance.

------------------------------
Rick Putnam
------------------------------

2 Replies

  • No but yes. Give them a checkbox and then have a Pipeline do the delete. Set the pipeline to only delete if the rules are met.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • PrashantMaheshw's avatar
      PrashantMaheshw
      Qrew Captain
      Mark, 
      this is such a neat idea . I will implement this

      ------------------------------
      Prashant Maheshwari
      ------------------------------