AnsweredAssumed Answered

Add trigger onto NotificationRuleTemplate

Question asked by mikespath on Jan 17, 2017
Latest reply on Nov 27, 2017 by mdspath


I'm a bit stuck on how to complete my building of templates via the sdk. Below is code that creates a new NotiifcationRuleTemplate, my question is how to add the analysis template for the trigger.

           // Create Element Template

            AFElementTemplate elmTemplate = db.ElementTemplates["ETma001"];

            if (elmTemplate == null)


                elmTemplate = db.ElementTemplates.Add("ETma001");

                elmTemplate.InstanceType = typeof(AFElement);



             AFNotificationRuleTemplate myAFRTtemplate = new AFNotificationRuleTemplate("MyNRTtemplate#2", elmTemplate, createEnabled: true);

            // have to add a trigger