I cannot call server side scripts from client side (onShow() script)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 12:09 PM
Hi guys!
I need some help to call server side scripts on client side script, specifically in an "onShow" script of a Context Menu Item (sys_ui_context_menu).
My objective is to run context menu "Export" onShow script to control wich table can be exported.
I`ve tryed to call GlideAjax (synchronous and asynchronous) and use Display Business Rule (like this example) and nothing happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 08:08 PM
Hi
sorry, it's not clear what the issue is. Why is the OOTB export functionality not sufficient for you. What exactly do you miss there?
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2023 06:23 AM
Hi Maik! of course,
My client needs to grant viewing of tables in his scoped application, but he cannot grant access to data export due to security measures.
That's why I'm not doing this control via ACL. Because I need to grant access to view but not export data.
I'm trying to edit the context menu header "export" to query a system property that will have a table black list.
Because of this requirement, I have this problem of not being able to call server side scripts in the context menu onShow script to consume system properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2023 08:47 AM
Hi
why so complicated?
Restricting read access via ACLs is the recommended and secure way.
And preventing exporting can be done via extending the conditions in the context menu records. For example you could add the condition:
&& ListProperties.getTable() != 'incident'
Maik