- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 12:42 AM
Hello team,
I have a requirement where i need to send a notification based upon priority
in an script include i used like this and passed it over BR ,Please guide me if this the correct way to pass priority as a variable
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:00 AM - edited 02-29-2024 03:49 AM
No, that is not the correct way to add instance fields to a script include. Also, the way you use it completely depends on what smsObj is in your example code. If it is an instance of your TwillioPropVal (created using something along the lines of var smsObj = new TwilliooPropVal()) then you should add your values in the initialize method like so:
initialize: function() {
this.base_Class = ["incident", "task_sla"];
this.priority_Sms = ['1', '2'];
},
However, I would suggest using static members. See my answer here on how to do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 02:00 AM - edited 02-29-2024 03:49 AM
No, that is not the correct way to add instance fields to a script include. Also, the way you use it completely depends on what smsObj is in your example code. If it is an instance of your TwillioPropVal (created using something along the lines of var smsObj = new TwilliooPropVal()) then you should add your values in the initialize method like so:
initialize: function() {
this.base_Class = ["incident", "task_sla"];
this.priority_Sms = ['1', '2'];
},
However, I would suggest using static members. See my answer here on how to do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 03:13 AM
How this Line i will use in Br Then
this.prriority_Sms = ['1', '2'];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 03:49 AM
Depends on what smsObj is, but it should be smsObj.priority_Sms if smsObj is an instance of your script include (also I had a typo in my answer, I used 3 "r"s in priority by accident. Please see my edit above).