web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Trigger Extension For POS

(0) ShareShare
ReportReport
Posted on by 5

I am trying to extend a trigger of POS by following exactly an example from MS document. However, when debugging on MPOS, the trigger extension is not loaded. The trigger is defined in "triggers" section on manifest.json file as described in document.

pastedimage1611201853258v1.png

pastedimage1611202837177v1.png

Then I try to put that trigger inside a View, now it's loaded. The trigger is actually not working because it is not supposed to be in View, but at least I know the TypeScript file is fine.

pastedimage1611202205062v3.png

pastedimage1611202419209v4.png

I am not sure if someone have used POS trigger extension and got it worked. Any hints, tips, shed light is much appreciated. Thank you very much.

Ryan

I have the same question (0)
  • Guanghui Profile Picture
    on at

    Hi, please build the whole solution, and start POS from visual studio, and then check POS settings to see if the extensions is really loaded.

    I have played this sample before, and it worked fine

  • Shane C Erstad Profile Picture
    on at

    As mentioned by the other poster, it can sometimes be a little finicky in getting a new extension "kickstarted" in the MPOS solution.  The full rebuild (as opposed to just "Build") is sometimes useful, as is right-clicking on "Pos.App" project and doing a manual deploy.

    Also, make sure that the modulePath in the manifest.json is set to the name of your FILENAME (without the .ts extension) and not the name of the class.  For instance, if I have a TriggerHandlers\PostSuspendTransactionTrigger.ts with a class named "MyPostSuspendTransactionTrigger":

    export default class MyPostSuspendTransactionTrigger extends Triggers.PostSuspendTransactionTrigger {

    ... then my manifest.json file should look like this:

    "triggers": [
    {
    "triggerType": "PostSuspendTransaction",
    "modulePath": "TriggerHandlers/PostSuspendTransactionTrigger"
    }

    This is what you have in your post, so it should work.  [Note that it's best practice to just name the file the same as the class.]

    Finally, make sure that you add the URL of your manifest.json to the extensions.json file at the root of the Extensions subfolder:

    {
    "baseUrl": "PostSuspendTrigger"
    }

    That should be all you need to do to get your trigger to load and your breakpoint to be hit.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 231 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 228 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 125 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans