Distinguish between FormClose after Add/Update and Cancel
francesca casiraghi
Hi all!I created a rule with optimizer to perfom some checks before an activity is added/updated - using item event ItemPressed - Before of Ok button.
If my validations are correct, I force some information in the activity (reminder activated, owner set with a certain logic and so on) and then let the save of the activity continue.
I need to perform these validations/data setting also if the form is closed with the standard windows forms X (in fact - clicking on the X - B1 asks if you want to save your changes ...): so I added the code also under FormClose - before event.
But FormClose is processed also if I click on Cancel. How can I distinguish between the two situations (so that I can perform my checks only if the form is closing after clicking on Add/Update and not after Cancel)?
thanks a lot for your help,
francesca
Michael Egloff
Hej Francesca,first I thought that there is no difference between the formclose event form the 'x' and the 'cancel' button.
But I've used the event logger from SAP (called eventspy) and noticed that there is a difference.
When you hit the 'x' then the field 'InnerEvent' is set to 'false'.
When you hit the 'cancel' button, 'InnerEvent' is 'true'.
Hope this helps you to get closer to your solution!
Michael
0
Please sign in to leave a comment.
Comments
0 comments