Domanda

I have a list called Tenders. I need to make sure that when Tender status field is set to "open" no one can delete it. Ideally would be if I won't see options in ecb and ribbon. It is not connected to users permissions but with state of list item. Should I use jQuery or is there an easier way?

È stato utile?

Altri suggerimenti

You could create an Event Receiver for the OnDeleting event that prevents the item from being deleted. Basically have the event receiver check for the value of the field and cancel deletion if the right requirements are not met.

It would be much better UX IMO to prevent the delete by either removing all the delete buttons or disabling them. Telling the user that they can't delete something after a post back is generally considered annoying these days.

Using client side script means that your user can always hack the page, of course, and delete the item anyway. It all comes down to your business requirements.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top