I have a Master/Detail screen in LightSwitch. I allow user to delete details’ items. However, the user is allowed to delete all except one. In other words,only one detail item needs to be present.
Is this doable in lightswitch?
Regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s how to do this:
Here’s how to code this. In this example, the master entity is AdAgreement, and the detail entity is Issues:
Unfortunately you can’t perform this check in the Entity_CanDelete event, which would give you a better user experience, in my opinion. The problem is that CanDelete operates at the entity set level, and there is no access to the individual entity that would be deleted.