- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:25 AM
I'm trying to make a ui policy where some fields becomes read only if the user isnt a "manager" on the knowledge base that the article is connected to.
I'm doing like the picture below, but can't get it to work, no idea why.
If I try this script in script-background it works as a charm.
var gr = new GlideRecord('kb_knowledge_base');
gr.addQuery('kb_managers','DOES NOT CONTAIN',gs.getUserID());
gr.query();
while(gr.next()){
gs.log("KB Base " + gr.title + " doesn't have your sys_id as manager");
}
Any clues?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 07:34 AM
There was an problem long back when the conditions of UI policy with fields would not work, unless it was added on the form layout. Not sure if this is related to that problem.
But please modify the form layout, dot walk the knowledge base field and add the manager list field to the layout. That would make the UI policy work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 07:34 AM
There was an problem long back when the conditions of UI policy with fields would not work, unless it was added on the form layout. Not sure if this is related to that problem.
But please modify the form layout, dot walk the knowledge base field and add the manager list field to the layout. That would make the UI policy work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 08:34 AM
Thanks a lot! this was the problem. I added the field on the form and tada.. it started to work. So that pretty much mean that if you Dot-walk in a ui policy, you also must make sure that the field is on the form, otherwise the ui policy wont be able to access the values in that dot walked field... This is real good information!
Since this was a problem back then, should I report this as a bug? kalai ?
//Göran

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 09:30 AM