Inbound emails from someone NOT apart of the HR Case

Rob Sestito
Mega Sage

Hey there SN Comm!!

I am looking to see what (if at all), others might be doing when it comes to allowing people that do not have access to view a Case/are not part of a Case - to be able to email into a Case.

Example:

recently we had a Case that was for one person, and they were the Requestor and Subject Person and Opened By (because they emailed into the system). The assigned to person of this Case, needed to reach out to the Requestor's manager. They did so, via emailing them from the Case itself. The manager then replied to that email from the Case. However, since they are not apart of the Case, and not in any assignment group from the system, their reply never reached the actual Case. It was ignored.

I reached out to SN with a HI Case because I was confused at first. I thought that if someone gets emailed from the actual Case, they would be able to reply and their reply would be posted to the Case. SN however, said that since the person being emailed does not have access to the Case (or apart of the Case in any way), that they cannot post anything to the Case - which includes their emails.

I then as a test, added that manager to the watch list, reprocessed their email, and it was posted to the Case.

We do not want to make this a thing, where we keep adding people to watch list, just to allow them to reply back to a Case when they are not actually involved in the Case.

First, does anyone out there know of this issue/scenario? Second, if you know about this, has anyone built anything as a work around? Is there something that can be done for this?

My initial thought was to create an addition field that is like the watch list field, but tie NO Out going emails like the watch list does. The watch list currently sends out emails for work noted AND additional comments, which we do not want. Especially when it is with someone not technically involved in the Case. But just reached out for additional information.

Thanks in advance!

-Rob

1 ACCEPTED SOLUTION

Hey John,

So yeah - seems like I needed to add the correct .addOrCondition line within the Restrict Query Business Rule. I tested with a few different tables that I am using this new field on within our HR Cases (COEs). Sure enough, each time I added the dummy account to the new field and sent my email in, the email posted. Once I removed the dummy account from the field, sent in another email, the email was blocked from being posted to the Case. It is a bit strange that the Business Rule would control all of that access, but I guess it does make sense when we really think about it. I was sure that I needed a new ACL, or at least had to modify an OOTB one (as provided by asifnoor). Then we went through also modifying the Include Script. But, turns out it was not needed. But I am glad we went through it, as I definitely learned a lot!

So, here is what was needed for the access:

Modify the OOTB Business Rule 'Restrict Query', with the new field I created (which is a List Field with a reference qualifier)

find_real_file.png

Here is my new field as a reference:

find_real_file.png

I hope this helps you, and anyone else - as this entire post has helped me!

Cheers!!

-Rob

View solution in original post

47 REPLIES 47

And in case you want to see the changes I made based off your suggestions.

find_real_file.png

 

find_real_file.png

Okay.

I think there is a difference in Madrid compared to earlier versions. Let us try like below.

var hasRole  = gs.hasRole('sn_hr_core.case_writer');
var canAccess = new hr_Case(current, gs).canAccessHRCase(gs.getUserID());
gs.log("Values from ACL are "+gs.getUserID()+"--"+canAccess);
if (hasRole || canAccess || new hr_Case(current, gs).canEditCase() || new hr_Case(current, gs).isApproverUserForCase(gs.getUserID()))
    answer = true;
else
	answer = false;

Kindly mark the comment as helpful if it helps. 

And now check the logs and share me the log output of what you get for these lines

gs.log("Values from ACL are "+gs.getUserID()+"--"+canAccess);

AND

  gs.log("values are "+this._case.getUniqueValue()+"--"+userId);

Kindly mark the comment as helpful if it helps.

Hey,

Unfortunately, I am getting the same errors from System Logs:

find_real_file.png

I don't think the last errors are related to our code. You can confirm by reverting our code once and check. 

 

Also clear cache once by typing cache.do in the navigation and retry once. 

 

Also, in the logs, filter by last 15 mins and check if you got the following output of these lines or not. 

 

 gs.log("values are "+this._case.getUniqueValue()+"--"+userId);

Kindly mark the comment as helpful if it helps.