How to use Script from arguments in application menu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2015 09:59 AM
Hi All,
How to write script when I select link type is "Script from arguments" in application menus. Please provide any example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 01:23 AM
from what i understand, supposing you dont want to show open incidents to some group people, but based on some condition you want to.
OR
you are talking about hiding the module itself??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 01:30 AM
Well in that case just create one "read" ACL with Type as "Record" on your table for the whatever conditions (like Assignment group IS "ABC" etc..) you want.
And keep the module as it is as I have given above.
So that ACL will restrict those users for viewing those records.
Thanks,
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2015 11:01 PM
If I write read ACL means users can't read that state records right. But here I just dont want to show that records in list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 03:04 AM
The best way to achieve this is make use of "Before Query business rule".
Create a business rule on your table with :
when : before
Select Query check box.
And "Advanced" tab specify the condition for some role or whatever your requirement is.
And in the Script field you can create a encoded query which forms url while displaying the data every time.
e.g. current.addQuery('current_user_id', gs.userID());
More info - http://www.servicenowguru.com/scripting/business-rules-scripting/controlling-record-access-before-qu...
Scripting in Business Rules - ServiceNow Wiki
hope this helps.
Thanks,
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2015 11:12 PM
If I write business rule to add query in list view means it will not show breadcrumbs on the list right. But I want to show the breadcrumbs so that's why I thought of going with script from arguments. And one more thing is I want to apply this condition on one module only.
For ex on change application menu we are having assigned to me and All changes module. I want this condition to be applied on assigned to me module only and corresponding breadcrumbs should be displayed on the list.
Is this is possible with Business Rule before query? Or else how to achieve this through from script from arguments.