Notifications

12 views

Symptoms

When the users go to service portal, under Requests header menu, only the tickets for which the user is the caller are shown. 

Release

Any supported release

Cause

The current logic in 'Requests' Menu Item, shows only the tickets for which the user is caller.

Resolution

Follow the below steps to display the tickets in which user is in watch list

 

  1. Navigate to Service Portal > Portal and open the portal record 
  2. Click through the main menu record that is used (In OOB, it is SP Header Menu).
  3. From Menu Items related list, open 'Requests'.
  4. Below is the logic in Server Script to display the incident tickets to the user where he is the caller.

var z = new GlideRecord('incident');
z.addActiveQuery();
z.addQuery('caller_id', gs.getUserID());
z.orderByDesc('sys_updated_on');
z.setLimit(max);
z.query();

 

          5.In the above script, change

z.addQuery('caller_id', gs.getUserID());

to


var zq =z.addQuery('caller_id', gs.getUserID());
zq.addOrCondition('watch_list','CONTAINS',gs.getUserID());

and save the record.

 

(We are adding an OR condition to check if the user is in watch list of incident record). The users should now be able to see the watch list incidents

Article Information

Last Updated:2019-03-22 12:59:26
Published:2019-03-20