Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

A little direction please

I have 2 lists, Trips and Travel. One trip can have many people traveling and have set up the association. What I am wanting to do is not allow the user to delete a Trip if there are any Travelers that have been approved. The travelers list has approvals on it.

Thanks for any guidance.

Hi @skigeek

Just to confirm, you would like to have some trips deleted if no travelers are approved, correct? Also, while I know you can hide the delete button from the form, the Trip may still be deleted from the List View. In that case, you may want to consider using the Manage Permissions action in workflows.

Assuming that most Trips will eventually have approved travelers (meaning a majority of the list items will not be able to be deleted), you can set it up so the new items have unique permissions that allow deleting, while the standard permissions for the list disallow deleting items.

You can consider the following steps:

  1. Set up a custom permission level that does not allow for deleting list items (https://sharepointmaven.com/how-to-create-a-custom-permission-level-in-sharepoint). Apply this as the standard permission for the list from the List Settings level. For example, we often suggest copying the Contribute permission level and removing the "Delete items" permission. Note: you will need Site Collection Admin privileges to copy and create new permission levels.
  2. Set up a workflow to break inheritance using Manage Permissions on every new item to apply the permission level which does allow for deleting items (i.e. before any Travelers are approved). For example, this could be the "Contribute" standard SharePoint permission level.
  3. Once one traveler is approved, you can trigger a Workflow to delete the unique permission (which allows the Trip item to be deleted) and apply the List-level permissions (which do not allow for deleting items).

At a high-level that should achieve what you're looking for. Let me know if this helps!

 

pf-amalin has reacted to this post.
pf-amalin