That very much depends on your error handling. RETURN NO-APPLY might not be catched by the default error handlig - therefore you would need to roll your own mechanism. But, since you don't give any additional info it's hard to speculate.
First of all I have to admit that I don't like database triggers - not one bit. IMHO they are a concept dating back to the beginning of the '90s of the last century and I would not recommend their usage.
In general:
Database triggers fire:
- The CREATE trigger immediately after the new record has been created and initial values have been assigned. Usually you would use it to assign a technical key automatically.
- The WRITE and DELETE triggers at the end of the buffer scope ( or transaction scope - whichever comes first ).
Therefore you should take great care on buffer and transaction scope when you use database triggers because they might not fire when you expect them to fire.
Furthermore, I've never used RETURN NO-APPLY in database trigger. In order to have a transaction undone by the ABL automatically you need to raise an error - therefore, if, use RETURN ERROR instead. I would speculate that RETURN NO-APPLY wold not raise an error and depending on buffer and transaction scope it might go through. When you use RETURN ERROR you might append a string to the statement which you can check on the RETURN-VALUE. But, then again, the RETURN-VALUE is another thing that needs to be used with care because it might contain a value from a previous RETURN statement - therefore in order to be 100% positive you would need to clear it in calling a procedure that explicitely returns "".
Anyway you should also have a look into your error handling.
Heavy Regards, RealHeavyDude.