Activity tab from Portal not visible to Line manager

Nikha Bisht
Tera Contributor

Hello all,

I had a requirement where I have to remove the Activity tab for External leavers (consultants, contractors etc) for offboarding cases. I could remove it, but internal Line manager (permanent user) who raised the offboarding case for External is also not able to view activity tab, however, if same line manager raise an offboarding case for internals, he could see. 

 

could you please help me with the solution.

 

Note: this is esc portal. 

3 REPLIES 3

Itallo Brandão
Giga Guru

Hi Nikha,

This behavior usually happens because the visibility condition is evaluating the Subject Person's data but ignoring the Current User's role in the case (the viewer).

Since this is the ESC Portal, you are likely controlling this in the Standard Ticket Configuration (sn_std_tkt_config). You need to update the Show Script for the Activity Tab to explicitly allow the opened_by (the Line Manager) to see the tab, even if the subject is external.

Here is an example of how the logic should look in the script:

// 1. Check if the Subject is External (replace 'contractor' with your actual backend value)
var isSubjectExternal = current.subject_person.employee_type == 'contractor'; 

// 2. Check if the Viewer is the Line Manager who raised the case
var isViewerOpener = current.opened_by == gs.getUserID();

// LOGIC:
// If the viewer is the Opener, ALWAYS show (return true).
// If the viewer is NOT the Opener, only show if the subject is NOT external.

if (isViewerOpener) {
    answer = true;
} else {
    // If I am not the manager, hide it for external leavers, show for internals
    answer = !isSubjectExternal;
}


Steps to fix:

  1. Navigate to Standard Ticket Configuration.

  2. Open the record for your Offboarding table (e.g., sn_hr_core_case_offboarding).

  3. In the Tabs related list, open the "Activity" tab record.

  4. Modify the Show Script (or Advanced Condition) to include the check for current.opened_by == gs.getUserID().

Hope this helps!

 

robin85buck
Kilo Contributor

I have a requirement to remove the Activity tab for external leavers (consultants, contractors, etc.) in offboarding cases. I was able to remove the tab successfully; however, this change is also affecting internal line managers

@robin85buck can you explain me more about your issue?

Thanks!