Not able to fire ON-COMMIT [message #632618] |
Tue, 03 February 2015 12:52  |
 |
ishanjrana
Messages: 10 Registered: July 2014 Location: India
|
Junior Member |
|
|
Hello,
I have created one form. In that form I am able to fire KEY-COMMIT trigger but ON-COMMIT trigger is not firing in any case.
Please help me.
|
|
|
|
|
|
|
|
Re: Not able to fire ON-COMMIT [message #632687 is a reply to message #632676] |
Wed, 04 February 2015 08:06   |
cookiemonster
Messages: 13904 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
What code exactly is in key-commit?
What level is on-commit defined at - form, block?
What exact code is in on-commit?
Does pre-insert/pre-update (whichever is applicable) fire?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Not able to fire ON-COMMIT [message #632742 is a reply to message #632736] |
Thu, 05 February 2015 03:23   |
cookiemonster
Messages: 13904 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You still haven't told us what code you put in on-commit or how you determined it wasn't firing.
That said it seems I'm a bit confused on the commit processing here, maybe someone with a working forms installation can help me out.
Key-commit by default runs commit_form.
The example in the documentation for on-commit says you should put commit_form in there.
If commit_form causes on-commit to fire then you would have thought that putting commit_form in on-commit would cause an infinite loop.
So either the docs are wrong or forms actually changes the behaviour of commit_form based on which trigger called it, which seems doubtful.
|
|
|
|
|
Re: Not able to fire ON-COMMIT [message #632749 is a reply to message #632748] |
Thu, 05 February 2015 03:52   |
cookiemonster
Messages: 13904 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
ishanjrana wrote on Thu, 05 February 2015 09:48Yes, generally we are using when-validate-record but in this case it causing me some problem so I am trying using ON-COMMIT.
What problem?
Also as a general point - never use key-commit, it can be bypassed. For example if you make changes and then exit the form you will be asked if you want to save changes, clicking on yes will save the changes without key-commit being fired.
|
|
|
|
|
|
|
|