You do not have permission to read the created record" when creating HR Case in HRSD

Satyam123
Tera Contributor

Hi Community,

I'm encountering a critical issue while creating an HR Case in HRSD. After submitting the case, I get the following alert:

"Alert level: critical. You do not have permission to read the created record."

Has anyone faced this before?

Additional context:

  • I'm creating the case manually (not via portal or API).

  • My user has roles like sn_hr_core.basic

5 REPLIES 5

PriyaRanji
Tera Guru

Hello Satya,

Please do check the HR Service (show to subject person is unchecked) and if unchecked then its an expected behavior, if you want to allow the subject person to see the record (please do enable it).

Please do let me know if it helps or not. Based on that I can support you further on it.

Thanks! Have a nice day 🙂

 

wpatrickhames
Tera Guru

Hi Satyam123, I just started experiencing this very same error, but it's very sporadic. Then when you look at the case, there is no HRC number - it's NULL. We are on the latest Yokohama patch 6, I think.

Did you ever figure out the issue?

tofum
Giga Contributor

Hello,

 

You’re getting this error because your user can create but lacks read permission on the HR Case record. The sn_hr_core.basic role is too limited for reading cases.

 

You can fix it : Add a role like sn_hr_core.user or check the ACLs on the HR Case (sn_hr_core_case) table to ensure your user can read the record after creation.

Satyam123
Tera Contributor

this happend because of this query br on hr case 


(function executeRule(current, previous /*null when async*/) {
// Get the list of groups the current user is a member of
var userGroups = gs.getUser().getMyGroups();

// If the user is a member of at least one group and the session is interactive
if (userGroups.length > 0 && gs.getSession().isInteractive()) {
// Dynamically filter the records based on the assignment group(s)
current.addQuery('assignment_group', 'IN', userGroups.join(','));
} else {
// Return if conditions are not met
return;
}
})(current, previous);
can you help me correct this code