Skip to main content

Check During store whether adding occurence,removing occurence?

Author: lalitpct@gmail.com (lalitpct)

is it possible that during store data I can check whether this store is for adding occurence(insert),removing occurence (delete)??

 

Check During store whether adding occurence,removing occurence?

Author: lalitpct@gmail.com (lalitpct)

is it possible that during store data I can check whether this store is for adding occurence(insert),removing occurence (delete)??

 

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)

Check During store whether adding occurence,removing occurence?

Author: lalitpct@gmail.com (lalitpct)

is it possible that during store data I can check whether this store is for adding occurence(insert),removing occurence (delete)??

 


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)

Check During store whether adding occurence,removing occurence?

Author: lalitpct@gmail.com (lalitpct)

is it possible that during store data I can check whether this store is for adding occurence(insert),removing occurence (delete)??

 

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)