Hide journal field data based on user parameters

Shiran
Tera Contributor

Hi all,

I have a requirement to create new journal field in Incident table. I created new field called "Operational Comment".

The data should be available based on user criteria.

Begore I'am adding the user criteria I just tried to hide the "Operational comment" via BR Query, as following:

 

1. I created BR Query on sys_journal_field table with script:

var query='element=comments^ORelement=work_notes';

current.addEncodedQuery(query);

 

2. I created BR Query on sys_history_line table:

current.addEncodedQuery('label!=Operational comments^ORlabel=NULL');

 

The issue is that in native UI the "Operational comment" not appear in the activity log, but in the agent workspace we do see the "Operational comment".

Why there is a difference???

2 REPLIES 2

Sai Shravan
Mega Sage

Hi @Shiran ,

The reason why you see the "Operational comment" in the Agent Workspace even though you have hidden it using Business Rules is that the Agent Workspace uses a different mechanism to display journal fields compared to the native UI.

 

In the native UI, the activity log is displayed using the "Journal fields" related list on the form. The Business Rule that you created to hide the "Operational comment" field is most likely working correctly and is preventing the field from being displayed in the "Journal fields" related list.

 

On the other hand, the Agent Workspace uses the "Activity Stream" widget to display journal fields. The "Activity Stream" widget is a separate UI component that is not affected by the Business Rule that you created. As a result, the "Operational comment" field is still visible in the Agent Workspace.

To hide the "Operational comment" field in the Agent Workspace, you will need to use a different approach. One option is to modify the ACLs (Access Control List) for the "Operational comment" field to restrict access to it based on specific roles or conditions.

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you

Thanks.

ACL is not answering my requirement.

I need to show the "Operational comment" only for users from same group.

means, I need to check who wrote the comment and allow to view it only for users from same groups.