incident short description updation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 09:10 PM
Hello All,
i need to update the incident short description like "incident number+ caller+ is updated this incident." using script include,
to achieve this functionality i wrote a script include like below, and i called that SI inside the Business rule but i dont know how to receive the data from script to business rule,
please help me.
Script include:
MyMethod:function(){
var details=new GlideRecord('incident');
details.addQuery('active',true);
details.addQuery('sys_id', current.SysID);
details.query();
while (details.next()){
return number+' '+ caller_id+ ' '+"is updated this incident.";
}
Business rule:
var dtls=new SIncludeBRcall().MyMethod();
Here i dont know how to update that data into short description.
Regards,
Venkat.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 09:13 PM
You can simply update the short description by using current if business rule table and target table are same or do a gliderecord if the table is another one. No need to use script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 09:18 PM
i am not getting your answer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 09:36 PM
write a BR on incident table:
current.short_description= current.number+' '+caller_id+'is updated this incident';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 09:22 PM
one additional line of code in BR (considering that its a before business rule)
var dtls=new SIncludeBRcall().MyMethod();
current.short_description = dtls ;