Session Trigger question

glenswan

New Member
I am getting more familiar with using session triggers in MfgPro but have not seen any information on something I would like to try:

Is it possible to intercept the calling of one of MFGPro's gp general purpose subprograms (Spcifically gmcmmt01.p) and replace it with my own variants of the program when called from SO Maintenance?

Glen Swan
I.T. Manager
VAM Drilling USA Inc.
Houston, TX
 

mosfin

Member
1. always mention your environment (Progress version, OS, etc..) when you post a question.
2. to my knowledge Progress (even the most recent version) does not support what you are looking for.

there are two types of triggers in Progress:
1) UI trigger: to catch keyboard/mouse event (e.g. press/release of a button)
2) DB trigger: to catch database record/field events (e.g. Find/Write/Delete of a record)
there is no trigger like:
Code:
ON RUN of "gmcmmt01.p" 
   DO:
       run xxgmcmmt01.p . /* your version */
   END.
normally when customizing QAD program, you must change the name of calling program/s (whole call tree chain of programs)
this can be a real hassle if the program is popular(called from many progs) or located deep down the call tree chain...
the quick & dirty method which i do NOT recommend, unless you document it VERY WELL, you can try (in TEST environment first of course)
to compile your version (e.g. xxgmcmmt01.p) into compiled code named exactly as the original(vanila) e.g. gmcmmt01.r
(1st make backup of the original gmcmmt01.r ) i used this method since i didn't have better way, but i do not recommend it
 

trx

Member
For that purpose you can add directory with custom programs at the beginning of PROPATH. If you place there your version of gmcmmt01.p then Progress executing RUN will run it instead of original one.
If you need to call original gmcmmt01.p from your procedure, then simply go through PROPATH and use SEARCH to find it and then call it (or call it with absolute path).
PROGRAM-NAME function, shared variables, content of parameters may be helpful if you need context-depended execution.
 

glenswan

New Member
Thanks for everyone's replies.

Sorry I forgot to include our environment:
MfgPro 9.0 SP5 Progress 8.3D AIX

First - a correction to my original post - the program name I want to override is gpcmmt01.p (Transaction Comment). Since this program is used in a number of programs and I only want to use a modified version in one (Sales Order Maintenance), this is why I am looking for some way to selectively overide the program call. I need to change one of the "where to print locations" field names (change "Quote" to "Order Acknowledgement" and add another one - "
Completion Notice").

Since it appears there is no easy way to do this, I am now thinking that I should be able to test for an exit of the standard Transaction Comment program and dispslay another modified "Where to Print" selection box. on update the values in the record created by the standard program.

Glen
 
Top