Apex trigger is not being trigger when record is created indirectly?

98 views Asked by At

I made an apex trigger which purpose is to be triggered everytime a cartitem is created or deleted. This works when create it directly in the database, but when I do it indirectly as user on trying to buy an item from my store (b2b commerce (LWR)), the trigger does not get triggered.

It like its being ignored in the store? any idea?

I have no debug logs to go by, since it is not being triggered at all, but the condition for it to be triggered has been fulfilled.

This is the trigger:

trigger SetSerial on CartItem (after insert, after update, after delete) {

        // List to store Cart IDs that need to be updated
            Set<Id> cartIds = new Set<Id>();
            Set<Id> productIds = new Set<Id>();
            System.debug('Hello World!');
    }
0

There are 0 answers