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 :
Microsoft Dynamics GP (Archived)

Dexterity - Cross Dictionary Trig against a sproc procedure

(0) ShareShare
ReportReport
Posted on by

Hi,

I have written a cross dictionary trigger against a procedure in the MFG dictionary.  The procedure in the MFG dictionary calls a stored procedure.  I need to trigger off of this procedure but I cant get the cross dictionary trigger to register properly.  Here is my register code:

result = Trigger_RegisterProcedureByName(346,  "mmopAddActivityRecord", TRIGGER_AFTER_ORIGINAL, script xtrig_mmopAddActivityRecord_Post);

The result always comes back SY_Invalid_Script, meaning that it cant find the procedure or I have the wrong number of parameters.  I have double checked both. 

My question is, is it possible to trigger off of a procedure that is ultimately a sproc calling procedure?

Thanks!

Terry Blaser

*This post is locked for comments

I have the same question (0)
  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Terry

    If this is a call to the sproc using the sproc returns functionality, you might need to register this as a function.

    I have not got anything to test this out on.

    David

  • Verified answer
    Community Member Profile Picture
    on at

    David,

    I tried your suggestion, although it did not work it did lead me to the correct answer.  After changing the trigger registration from Trigger_RegisterProcedureByName to Trigger_RegisterFunctionByName the runtime gave me a different error.  This time it gave me an Invalid Object error as opposed to an Invalid Script error.  This told me that registering it as a Procedure was at least finding the object.  This left the possibility that my parameters were incorrect.  

    On reviewing the parameters I discovered that I had changed one of the data types from a native DDL (drop down list) to an integer.  I made an assumption that DDL's actually pass Integer values and that the trigger would accept it.  I was wrong.  I ended up manually creating the fields and data types that were in the MFG dictionary for the fields that I needed.  This did the trick.  I am surprised that a DDL isn't actually passing an integer value between scripts, learn something new every day.

    Thanks for the help!

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Terry

    I am not sure if the difference is DLL vs Integer or Field vs Variable.

    Glad you got it sorted.

    David

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 > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans