- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2021 02:43 AM
I have created a script include which is returning sysid from system properties table,the same method is i'm calling in custom created module in filter arguments. It is perfectly working for admin profile but when we create custom profile the filter condition not working as expected(filter condition value coming as empty)
Please see attached snapshot for reference ,If you provide some suggestion it would be great.
P.S : There is no custom role created for module and the module is in global scope and table(Risk Statement) which we are used in module is in grc:risk management scope.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2021 09:50 AM
I reviewed this a bit further and actually realized that the issue on my suggestion is that gs.getProperty doesn't work on client side and arguments is checked there.
I also reviewed your script include and I don't think there's an issue with the script, but it won't work with glideajax. Try making a normal script include and then check the "client callable" option there. You still can't use gs.getProperty, but at least your gliderecord query should work and return the correct value.
I also made sure that it doesn't matter where you have javascript set so you can use
&sysparm_fixed_query=document=javascript:new scriptinclude().function();
Let me know if tossing the glideajax out gets this working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2021 03:23 AM
You shouldn't need that script include. You could just use gs.getProperty('testing.itcs').
I notice you've tested something similar underneath, but you've used a different property name there, which may be why that didn't work.
That way, the filter argument could just read:
document=gs.getProperty('testing.itcs');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2021 03:42 AM
Hi Phil,
Thanks for the quick response ...the commented code also not working when we use gs.getProperty('testing.itcs') in filter arguments as below mentioned ways.
1. &sysparm_fixed_query=document=''+gs.getProperty('testing.itcs')
2. javascript:'&sysparm_fixed_query=document=' + gs.getProperty('testing.itcs')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2021 03:24 AM
There are a few things you can try to change.
For example in your script include gs.getProperty('property_name'); should be enough to get the property.
So you could use return gs.getProperty('testing.itcs');
Also, for the filter I'd try something like
javascript:'&sysparm_fixed_query=document=' + new global.itcs_sysId().getSysId()
I also doubt you need to use the script include and could directly go with
javascript:'&sysparm_fixed_query=document=' + gs.getProperty('testing.itcs')
Make sure you start with javascript: if you wan't to use javascript here.
Feel free to play around with these if they don't work rightaway as it has been a while since I've done anything like this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2021 03:43 AM
Hi Joni,
Thanks for the quick response ...the commented code also not working when we use gs.getProperty('testing.itcs') in filter arguments as below mentioned ways.
1. &sysparm_fixed_query=document=''+gs.getProperty('testing.itcs')
2. javascript:'&sysparm_fixed_query=document=' + gs.getProperty('testing.itcs')