function BtTriggersDELOnClick ()
{
var Log = System.CreateObject(‘Log’);
var Model = Entity.Root();
/*
We need to read original object. ‘Entity’ is only a temporary
object (created when a form is edited) that that doesn’t have
all properties loaded/filled.
*/
var OrigEntity = Model.Entities.GetObjectById( Entity.Id );
Log.Information (“Button DEL TRG - START”);
Log.Information(OrigEntity.Name);
// Triggers
for (t=0; t<OrigEntity.Triggers.Count; t++)
{
Trigger = OrigEntity.Triggers.GetObject(t);
Trigger.Delete();
}
Log.Information (“Button DEL TRG - END”);
}