Written by

Technical Consultant at Traverse Health
Question Muhammad Waseem · Aug 4, 2021

how to write code in table trigger to send SMS upon any modification?

Hi,

How to write code in table trigger to send SMS upon any modification on particular column?

Thanks
 

Comments

Warlin Garcia · Aug 4, 2021

Is the question how to write a trigger or how to send a SMS from within Cache/IRIS? 

You should be able to find how to do both things in the Intersystems documentation (link not working for me right now).

0
Eduard Lebedyuk · Aug 4, 2021

There are two parts to it.

1. Create a trigger after INSERT/UPDATE/DELETE. Triggers can work for both sql and object access:

Trigger NewTrigger1 [ Event = INSERT/UPDATE/DELETE, Foreach = row/object, Language = objectscript, Time = AFTER ]
{
    set ^dbg={fieldname*N}
}

2. In the trigger code send an SMS. You can either use an API (a lot of them available) or talk to a GSM modem.

0