onChange script error: ReferenceError: GlideTemplate is not defined function () { [native code] }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:19 AM
I am applying a Tamplet when "Type of Project Field" changes to A.
I am getting error message like this.
onChange script error: ReferenceError: GlideTemplate is not defined function () { [native code] }
My Client script is as given below.
Pleae gide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:41 AM
do this
1) use after update BR on your table with condition as Field Changes to A
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var newRec= new GlideRecord('pm_project');
newRec.initialize();
GlideTemplate.get('51597e3b979e75507110d6081153affa').apply(newRec);
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 01:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 01:16 AM
Nothing is happning
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 01:40 AM
AM I missing somethng ?