Track back triggering button in when-validate-(record/item) [message #392796] |
Thu, 19 March 2009 05:26 |
|
didiera
Messages: 134 Registered: August 2007 Location: Mauritius
|
Senior Member |
|
|
Hello again everyone,
I was trying to implement something here but I might not be right in my assumption. I am trying, from within an when-validate-item or when-validate-record to know (form runtime system variables :system) which object fired the latter trigger in order to either go along with validation or short-circuit this process. In clear I just want that when I press 'Cancel' or 'Delete', I don't get any 'This field requires a valid amount' kind of behaviour. When setting the buttons 'Keyboard' and 'Mouse Navigable' properties to 'No', I get to implement my cancel logic but still with the stupid message and I was just thinking if something of the kind I introduced above couldn't be achieved with a reasonable amount of additional code, preferrably, from within the when-validate-thing trigger itself.
regards,
Didier
|
|
|
Re: Track back triggering button in when-validate-(record/item) [message #392851 is a reply to message #392796] |
Thu, 19 March 2009 08:43 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Quote: |
I am trying, from within an when-validate-item or when-validate-record to know (form runtime system variables :system) which object fired the latter trigger in order to either go along with validation or short-circuit this process.
|
Trust me, you don't want to do that.
I've seen people try it and it always causes grief.
The problem is that your buttons are kicking off validation at all.
So:
What code is in these buttons?
Are they in the same datablock as the rows you're trying to affect?
Why not just use the default menu commands?
|
|
|
|
|
|
|