I have a default data entry screen in Lightswitch. Problem is, when the user does not wish to enter a new record, the user closes the screen to navigate elsewhere. Upon closing the form, the user is presented with the “Save changes before closing?” message. Is there a way I can suppress this message in a scenario in which the user has not entered any data in this screen?
Share
In the screen’s Closing method, you can add a call to DiscardChanges for the entity that the screen is bound to (which I’ve called EntityPropertyName in the code below).
VB:
C#: