-
Hi Everyone I am trying to make some validation logic, preventing high numbers (usually from a barcode scan) ending up in the quantity field... My strategy to do this, is having some validation logic on the PreAdjustStockCountLineQuantityTrigger. When I put a breakpoint on the first line in the execute-method, it is never being hit. Is there something wrong with my logic: My trigger looks like this: export default class PreAdjustStockCountLineQuantityTrigger extends Triggers.PreAdjustStockCountLineQuantityTrigger {
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hello @MBoending - this sounds more like an issue with loading the trigger extension rather than any problems with the logic in the extension trigger itself. Do you see your extension trigger being loaded in Store Commerce when you're testing it? It should be listed under Extensions on the Settings page. If you don't see it, these docs can help show you how to set up the extension: |
Beta Was this translation helpful? Give feedback.
-
Hello @madyke I will agree with your assesment... indeed it sounds like that... But it actually does register and also loads with Success. On top of that, I have, (as you can see on the screenshot below)... setup triggers on PreSaveStockCountJournal which also did not work... But the one on PreOperation works just fine. So I wonder why those two related to Stocks does not fire. |
Beta Was this translation helpful? Give feedback.
Hi @MBoending - I think I found the root cause. It looks like a couple of years ago, there was an update made to the Stock Counting operation that provided a refreshed and improved UI experience. Unfortunately, as a part of that transition it seems that the
PreAdjustStockCountLineQuantityTrigger
was missed and is not available in the new experience.Given that this functionality has been missing for a while without anyone noticing before, and since it would take some engineering to integrate the trigger into the new Stock Counting experience or add a new trigger with similar functionality, you will need to file an extensibility request if this is an extension point you want to see added t…