1

We need transaction type of functionality in SharePoint List.

Process is like user will do add/update or delete actions on SharePoint list items.

There should be one approval process, here it is,

  • User wants to add an entry into the list. He will fill the form and this data will go to approver, if approver accept the entry, then item will be created in list otherwise not.

  • User wants to update an existing entry from the list. He will update an entry and this data will go to approver, if approver accept the entry, then item will be updated in list otherwise not.

  • User wants to delete an existing entry from the list. He will do delete operation and this data will to approver, if approver accept the entry, then item will be deleted from the list otherwise not.

Below are the solutions in my mind,

  • Event Receivers has before events but it wont work because it will not wait for approval.

  • Workflows also wont work because it acts on the after events like created and modified.

What things I can try?

0

Let's say that this is all wrapped up in a Requests list. This list would have a Status column with several states like: "Accepted", "Pending to accept", "Pending to modify", "Denied" etc., but default value when creating an item would be "Pending to accept".

This list will have four views:

  1. Accepted requests. This view will show all entries with Status as "Accepted".
  2. Pending to accept. This view will show all entries with Status as "Pending to accept".
  3. Pending to modification. This view will show all entries with Status as "Pending to modification".
  4. Pending to delete. This view will show all entries with Status as "Pending to delete".

Only approver would have permission to see the four views. Normal user will only be able to see the view Accepted requests.

  • First case: As created items will have Status column as "Pending to accept", approver will be able to see these items in the Pending to accept view. Approver will be able to delete this item if item isn't valid, or accept, by changing Status column to "Accepted". So no need to use workflow or Event receiver in this case.
  • Second case: Here I would code an Event receiver to know if some field has changed. If some field has changed, change the Status column to "Pending to modify" by code. If approver doesn't approve, approver can restore item to a previous version (Here how), so item will be like it was (like denied modification), otherwise, if approver approves, approver just needs to change the Status column's item to "Accepted".
  • Third case: For this case, delete action cannot be enabled for users. I would create a checkbox field called Request to delete. If user checks that checkbox and saves the item, in the same Event Receiver described in the second case, Status column would change to "Pending to delete". So, when approver goes to "Pending to delete" view, he will be able to accept (by deleting that item), or restore item to a previous version (Here how), so item will be like it was (Request to delete = No and Status = "Accepted")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.