1543 views

Description

When adding a Reference to a table and derived dot-walked fields from the referenced record to the List view on the original table, the ACLs on the referenced table do not have access to the full referenced record. Instead, they have access only to those specifically derived fields.

For example:

  • Table A is a task table.
  • Table B is an email table.

Add a referenced field on Table A that references Table B.

Add derived fields to the List view of Table A.

When viewing a list of Table A records, the ACLs on Table B run, but the "current" inside those ACLs is a GlideRecord containing only the specifically derived fields displayed on the Table A list. This affects usability when allow/deny decisions are based on fields that are present in the full Table B record, but are not present when the Table B record is part of a list of Table A records.

 

Steps to Reproduce

 

  1. Create table test_table_a (col1, col2, col3)

  2. Create table test_table_b (col1, col2, col3)

  3. On Table A > add column > name = table_b; type = reference; reference = test_table_b

  4. Add read ACL on test_table_b

    1. admin overrides = false

    2. advanced = true

    3. script > answer = (current.isNewRecord() || current.col3 == 'foobar')

  5. Insert record into Table B (col1 = foobar, col2 = foobar, col3 = foobar)

  6. Insert record into Table A (col1 = foobar, col2 = foobar, col3 = foobar, table_b = <reference to foobar record inserted into test_table_b>

  7. Configure test_table_A list configuration and add TableB.col2 (remove Table B reference, if there)

  8. Load List view on Table A and notice that TableB.col2 is not populated (go to Table B List view and see col2 value)

Workaround

This is expected behaviour and working as designed. In order to optimize the performance of the list view you can apply one of the following:
 

Workaround 1: Add the column referenced in ACL to the List view.

Adding the column to the List view results in the value being part of the query. When the ACL is executed, that column value is now present and can be evaluated correctly.

 

Workaround 2: Rewrite ACL to not depend on the current value for the field that is not in the List view.

The ACL can be rewritten to not depend on the current value for the column that is not displayed. If the ACL cannot be reworked to avoid using that column, it can query the value directly from the database using GlideRecord. Note: There is a performance hit to execute the additional query.

 


Related Problem: PRB573139

Seen In

Aspen Patch 2
Aspen Patch 3
Aspen Patch 5
Aspen Patch 7
Berlin Hot Fix 2
Berlin Hot Fix 4
Berlin Patch 1
Berlin Patch 10
Berlin Patch 2
Berlin Patch 5 Hot Fix 1
Berlin Patch 5 Hot Fix 2
Berlin Patch 8 Hot Fix 1
Calgary Patch 1
Calgary Patch 2
Calgary Patch 2 Hot Fix 5
Calgary Patch 2 Hot Fix 8
Calgary Patch 3 Hot Fix 1
Calgary Patch 5
CCA 6
Dublin EA 3
Dublin EA 7
Dublin EA 8
Dublin Patch 3
Dublin Patch 5
Dublin Patch 7 Hot Fix 2
Eureka Patch 10
Eureka Patch 11 Hot Fix 2
Eureka Patch 2
Eureka Patch 3 Hot Fix 1
Eureka Patch 4 Hot Fix 4
Eureka Patch 6
Eureka Patch 7
Eureka Patch 8
Eureka Patch 9 Hot Fix 1
Fuji Patch 1
Fuji Patch 10
Fuji Patch 10 Hot Fix 4
Fuji Patch 11
Fuji Patch 13 Hot Fix 1
Fuji Patch 3 Hot Fix 4
Fuji Patch 4 Hot Fix 4
Fuji Patch 5
Fuji Patch 6
Fuji Patch 7
Fuji Patch 7 Hot Fix 5
Fuji Patch 8
Fuji Patch 9
Fuji Patch 9 Hot Fix 1
Geneva Patch 3
Geneva Patch 3 Hot Fix 2
Geneva Patch 4
Geneva Patch 5
Geneva Patch 5 Hot Fix 4
Geneva Patch 6
Geneva Patch 6 Hot Fix 2
Geneva Patch 7
Geneva Patch 9 Hot Fix 1
Helsinki Patch 2
Helsinki Patch 3
Helsinki Patch 4
Helsinki Patch 5
Kingston

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-09-10 04:19:34
Published:2018-06-22