How to create a trigger when sod_qty_ord = 0

Hi all,
In Sales Order Maintenance function, when user enter/edit a SO line, if sod_qty_ord = 0 then send an email to announce to someone. How to do this? Have any one know about this please help me!

Thank in advance
 

oldemanw

Member
I would actually write a wrapper program for Sales Order maintenance, so that at the exit a routine would check the sales order lines for qty = 0.

something like this:

{mfdeclre.i}
{gprun.i ""sosomt.p""}

/* catch sales order number here */
/* find sales order lines with qty = 0 */
/* if found, send email to ? */
 

sharkdim

Member
for me ,
i will give the sosomt.p a program trigger ,such as (it's only an example)
on write of sod_det.sod_qty_ord do:
if sod_qty_ord = 0 then do:
/*send the mail scripts*/
end.
end.
 

oldemanw

Member
Hi Sharkdim,

I'm actually weary about using triggers, since a lot of our customised software (as developed by QAD) relies on triggers.
Setting triggers in our own programs would then overrule those created by QAD, making the software flakey. I prefer wrappers.


My 2 cents.

Regards,
-Willem.
 
Top