Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Database Triggers

Posted on by 6,010

Are custom triggers allowed to be written on the Dynamics and Company databases of GP?

*This post is locked for comments

  • Ron Wilson Profile Picture
    Ron Wilson 6,010 on at
    Re: Re: Re: Re: Database Triggers

    Great...thanks guys.  I would think this trigger would be after the fact of SOP entry.  We actually do not use GP's interface for SOP entry, so I would think that once an order is saved and processed through eConnenct, all the business logic should have fired correct?  After that, I am just wanting to trigger an event if the order lands in the "CREDIT REVIEW" batch.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Re: Database Triggers

    Triggers on batches should be OK. Are you hoping to get data every time a transaction is added to certain batch? This will be straighforward.

    Mariano is right. Triggers are fine and we've also written literally hundreds. The only issues I have seen was with triggers written by customers on the SOP entry window. I've seen cases where genuine GP triggers didn't fire because a custom trigger was firing first etc. Test in a test company with a trace running. Generally performance is not an issue.

    Best regards,

  • Ron Wilson Profile Picture
    Ron Wilson 6,010 on at
    Re: Re: Database Triggers

    Thanks for the input guys.  I am not looking to modify any existing triggers at all.  Only add new ones.  So then there should be any issues with this regarding the business logic?  What about performance issues (which I know is an fairly vast question)?

  • callen Profile Picture
    callen 4,595 on at
    Re: Re: Re: Database Triggers

    I believe that as long as you are only adding a new trigger and not changing existing triggers and are not trying to change the behavior of the system, you should be fine. You're testing this, of course, in a test company database.

  • Ron Wilson Profile Picture
    Ron Wilson 6,010 on at
    Re: Re: Database Triggers

    SOP was where I was wanting to place a trigger.  To trigger when a specific batch is hit (our credit review batch).  So you think this could cause issues?  If so, I can just run a query in very short intervals (90 secs or something) to check for new orders in that batch.  I would prefer a trigger so that it is real time, but I would also perfer not to bork our GP install.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Database Triggers

    Depends what you mean by allowed!. Yes, its possible. What kind of triggers, and on what tables etc? You need to be careful. I have lots of examples of customers messing up the standard buiness logic in GP depending on when their custom triggers run - especially in SOP.

    Best regards,

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans