Code in the write trigger will only fire if the occurrence is being added or updated, $storetype in this trigger will tell you which.
Code in the delete trigger will only fire if the occurrence is being deleted.
Thanks for reply
In all screens we are calling one common global functions which calls store while storing , hence changing code in all delete trigger wont be possible.
1)Is there a way to check whether the current store is for deleting while hitting store ?
No, because a store can do all three at the same time.
If you go to a form, retrieve more than one occurrence, change one, remocc one, and insert one. The next store you do will delete an occurrence, update an occurrence, and insert an occurrence all in one transaction. So store itself, does not have a state like this.
Check out
global updates->Fields
or
global updates->component fields
to set many delete triggers and write triggers, but beware that it will overwrite the existing contents of those triggers, so if there are any current mods, they'll be overwritten.
3 Comments
Local Administrator
Code in the write trigger will only fire if the occurrence is being added or updated, $storetype in this trigger will tell you which.
Code in the delete trigger will only fire if the occurrence is being deleted.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
Thanks for reply
In all screens we are calling one common global functions which calls store while storing , hence changing code in all delete trigger wont be possible.
1)Is there a way to check whether the current store is for deleting while hitting store ?
Author: lalitpct (lalitpct@gmail.com)
Local Administrator
No, because a store can do all three at the same time.
If you go to a form, retrieve more than one occurrence, change one, remocc one, and insert one. The next store you do will delete an occurrence, update an occurrence, and insert an occurrence all in one transaction. So store itself, does not have a state like this.
Check out
global updates->Fields
or
global updates->component fields
to set many delete triggers and write triggers, but beware that it will overwrite the existing contents of those triggers, so if there are any current mods, they'll be overwritten.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)