| Re: Customizing the Notifications? I have written a series of Saved Queries (SQL Scripts) that execute, and then included these in an agent as IF Conditions.
EG, IF Servprov does Match, would end up something like... SELECT i.invoice_gid
FROM invoice i,
invoice_refnum ir,
shipment_refnum sr,
shipment s,
servprov_alias sp
WHERE i.invoice_gid = ir.invoice_gid
AND ir.invoice_refnum_value = sr.shipment_refnum_value
AND sr.shipment_gid = s.shipment_gid
AND sp.servprov_gid = s.servprov_gid
AND sp.servprov_alias_qual_gid = i.servprov_alias_qual_gid
AND ir.invoice_refnum_qual_gid = 'BM'
AND sr.shipment_refnum_qual_gid = 'BM'
AND sp.alias = i.servprov_alias_value
AND ir.invoice_gid = $gid
If this returns no record, then you know that the servprov is not correct. YOu first have to check that the Shipment exists though. The sequence is fairly important.
Hope this helps. |