Hi,
What is the difference between "UPDATE", "INSERT", "INSERT, UPDATE"? What other events exists?
INSERT event will filter all events except object creation, so basicaly trigger will fire only when new object created
UPDATE event will filter all events except object update, so it will fire when object updated
DELETE event will filter all events except object deletion, so it will fire when object deleted
Than you can have differn combinations of them like
INSERT UPDATE
INSERT UPDATE DELETE and etc
Some examples:
POST_VALIDATE update_demand_record() 23331 FILTER( EVENT("UPDATE") );
this will fire update_demand_record method each time request is updated
POST_VALIDATE update_demand_record() 23331 FILTER( EVENT("UPDATE") && description{});
this will fire update_demand_record method each time request description is updated excluding creation event
POST_VALIDATE update_demand_record() 23331 FILTER(description{});
this will fire update_demand_record method each time request description is updated
POST_VALIDATE update_demand_record() 23331 FILTER(description{} || status{->'WIP'});
this will fire update_demand_record method each time request description is updated or status changed to work in progress
Where could i find this documentation?
There is no official documents
What are the differences beteen PRE_VALIDATE, POST_VALIDATE, POST_CI and when to use each of them?
My understanding is that differences between them are the firetime, while i am not sure what is the difference of PRE_VALIDATE, POST_VALIDATE, but POS_CI is definetly used when transaction is checked in, and if you will use this trigger you will not have direct access to context object attributes. There is also DB_INIT trigger that, as i remember, can be used to prepopulate attributes. It seems sd14 introduced new set of triggers ON_PRE_VAL and ON_POST_VAL more info can be found here: How to terminate action via spel macro without displaying error?
CA also have attribute triggers like ATTR_INIT but i never used them.