- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2017 06:00 AM
Hi,
I need a module under inicidents application like 'my owner incidents' which should get incidents of my owner.
i.e, condition is ---if i am the delegate of user/users then i should get incidents of that user/users
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2017 07:48 AM
Yes I believe it should work in scoped app as you are adding new records in a different scope. I just tried out on my instance and it was working in global scope. Please try these steps and let me know the results. You will have to modify the script calls based on scoped naming convention.
1) Create a client callable script include "FilterOwners" with script as
var FilterOwners = Class.create();
FilterOwners.prototype = {
initialize: function() {
},
getMyOwners : function (){
var answer = [];
var gr = new GlideRecord("sys_user_delegate");
gr.addEncodedQuery("ends>javascript:gs.daysAgoEnd(0)^delegate="+gs.getUserID());
gr.query();
while (gr.next()) {
answer.push(gr.user.toString());
}
return answer;
},
type: 'FilterOwners'
};
2) Create a dynamic filter as shown on user table, mark available for filter and Script as new FilterOwners().getMyOwners()
3) Go to incident list and try this filter, You can add the same filter in your module.
One more point to add, OOB there is a default dynamic filter called as One of my Assignments, this also runs on delegate table but only return those owners who are marked as assignments=true on delegate record.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2017 08:35 AM
Hi,
You will need to create a new dynamic filter option and use it as the filter for your module. The filter should return all of your owner delegates.
Create the filter on user table, you can use the OOB filter for 'One of My Assignments' can be referred.
Create a dynamic filter option
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2017 07:30 AM
but this has to done with scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2017 07:48 AM
Yes I believe it should work in scoped app as you are adding new records in a different scope. I just tried out on my instance and it was working in global scope. Please try these steps and let me know the results. You will have to modify the script calls based on scoped naming convention.
1) Create a client callable script include "FilterOwners" with script as
var FilterOwners = Class.create();
FilterOwners.prototype = {
initialize: function() {
},
getMyOwners : function (){
var answer = [];
var gr = new GlideRecord("sys_user_delegate");
gr.addEncodedQuery("ends>javascript:gs.daysAgoEnd(0)^delegate="+gs.getUserID());
gr.query();
while (gr.next()) {
answer.push(gr.user.toString());
}
return answer;
},
type: 'FilterOwners'
};
2) Create a dynamic filter as shown on user table, mark available for filter and Script as new FilterOwners().getMyOwners()
3) Go to incident list and try this filter, You can add the same filter in your module.
One more point to add, OOB there is a default dynamic filter called as One of my Assignments, this also runs on delegate table but only return those owners who are marked as assignments=true on delegate record.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2017 09:19 AM
That was Awesome...Thanks!...