0

Note - I'm posting this question as there's clarity required - At what level does the record access need to open up for this scenario to be successful? This hasnt been clearly answered on the Community/StackExchange.

(Ref 1: StackExchange - You don't have permission to do this)

(Ref 2: Salesforce - You don't have permission to do this)


Role Hierarchy/Sharing Settings

We have a Role heirarchy as below :-

  1. -Super Admin
  2. --USA Admin
  3. ---USA Support

We have an Account Sharing Rule which has a 'Reseller' RecordType shared with USA Admin (Role and Internal Subordinates). Access to Account is R/W and Case is Private.

The access opens up on the Case Sharing Rules where all the RecordTypes are shared with USA Admin (Role and Internal Subordinates). Access to Case here is R/W


Scenario

  1. We have a Flow (which is invoked via Process Builder) that has a chatterPost Action which @mentions a Chatter Group to a Case. The CaseID is pass via Process Builder, alongwith Custom Metadatas for the Chatter Message and the MDT containing the (Chatter) Collaboration Group ID. This is triggered based on keywords/other conditions via the process decision box.
  2. The Chatter Groups are Public and Agents have access to post to them/@mention them on Cases.
  3. Success - If an Agent (USA Support role) creates a Case on a Account which he owns, the Process -> Flow works correctly and auto @mentions the Chatter Group with the Chatter Message.
  4. Failure - If the Agent creates a Case on an Account for a role above theirs (USA Admin/Super Admin), the Process/Flow fails with the error - 'You don't have permission to do this'

I know there are a few posts based on this issue (as referenced above), but here, the user/role has access to the Case and Chatter Group where the postToChatter action happens. Any idea how the access is being restricted/why this flowAction error is occuring?


Error Logs

How the Interview Started

Agent ABC (0050r000000lUoG) started the flow interview. Some of this flow's variables were set when the interview started. input_CaseRecordID = 5000r000002EKLvAAO input_ChatterGroupID_MDT = 0F90r000000087hCAA input_ChatterMessageDeveloperName_MDT = CC_Case_Chatter_Message

GET RECORDS: Lookup_the_Chatter_Setting_MDT Find one Chatter_Setting__mdt record where: DeveloperName Equals {!input_ChatterMessageDeveloperName_MDT} (CC_Case_Chatter_Message) Result Successfully found record. {!var_ChatterMessage} = This Case requires your attention. Please click 'Follow' to get regular updates for this Case. Once 'Closed', please 'Unfollow' the Case to stop receiving email notifications.

POST TO CHATTER: Post_to_Case_Record Inputs: text = {!tt_ChatterPostForCase} (@[0F90r000000087hCAA] - This Case requires your attention. Please click 'Follow' to get regular updates for this Case. Once 'Closed', please 'Unfollow' the Case to stop receiving email notifications.) subjectNameOrId = {!input_CaseRecordID} (5000r000002EKLvAAO)

Error Occurred: You don't have permission to do this.


1 Answer 1

0

As I'm unable to add comments to question, I'm trying to get more clarity on the question.

Does this user able to post on that case record from UI?

3
  • Yes, the Agent user can post on the Case record via UI manually. Can also tag the respective Chatter Groups.
    – gutsyfella
    Feb 5, 2020 at 14:24
  • Could this be related to field access level issues, any inaccessible field referred in flow to post to chatter?
    – asknet
    Feb 5, 2020 at 14:37
  • I dont believe it's a field access issue. If it was, the postToChatter flow would have failed when the Agent was the owner of the Account. Since it works when the Agent is the Account owner but not when he isn't, I believe it to be a Sharing/Role related issue.
    – gutsyfella
    Feb 5, 2020 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.