How to change field visibility on a configurable table form another scope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 05:45 AM
Hello,
Suppose I have a scope1_table and I made it configurable (allow configuration checked) and added UI Policy or client script in scope2. In that case, I'm facing issues changing any field properties (for example to hide a field) defined in scope1_table in scope1.
I can only change fields defined in scope2 (although on scope1_table).
With UI Policy (created in scope2 on scope1_table) I'm not allowed to select fields defined in scope1 in the same table when creating UI Policy Action, while in the client script, if I use g_form.setDisplay('fieldName', false) it trows an error in the browser console that this operation is not allowed as there are cross-scope access:
I tried to add cross-scope privilege:
I added cross-scope privilege with the following content:
- Source Scope: scope2
- Target Scope: scope1
- Target Type: Scriptable
- Target Name: g_form.setDisplay
- Operation: Execute API
- Status: Allowed
I run cache.do to be sure the new record above will be considered but I was still getting the same error, when tried to hide the fields from scope1 in scope2 (using the client script created in scope2 on the scope1_table).
Anny suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 06:21 AM
Hi,
Try creating an "Application Cross-Scope Access" record. There is a module for that. see:
CrossScopePrivilegeRecord.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 06:26 AM
Thanks for the suggestions this was what I did in:
without success. I'm not sure that these records are working with client script objects at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 10:48 PM
I resolved this issue by creating a new section and moving the fields from scope1, which I wanted to hide in scope2, using g_form.setSectionDisplay is working cross-scope.