• matthew Gordon
  • NEWBIE
  • 0 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi All, 

I am trying to create a validation rule that restricts the ability to change the status of a case to Transfer for all users. 
It should restrict the user from changing the status of a case with a specific record type to transfer, unless the user has a specific role which will allow it to use that status.

The syntax passes, but whenever I test the rule on a case I get the validation error with the roles listed.

Any help would be very appreciated. 

Thank you in advance!
 
AND( 
ISPICKVAL(Status, "Transfer"), 
RecordType.Name = "Example", 
OR( 
NOT($UserRole.Name = "CEO"), 
NOT($UserRole.Name = "CFO"), 
NOT($UserRole.Name = "CIO"), 
NOT($UserRole.Name = "Admin") 
) 
)

 
Hi, 

I am trying to create a trigger when Users are created with a specific custom profile(there are multiple), they need to have the service cloud user flag checked. The trigger for enabling the flag on user creation was easy enough, but how do I limit to specific profiles? Is this possible?

trigger ForceServiceCloud on User (before insert) {
    for (User userInLoop : Trigger.new) {
        userInLoop.UserPermissionsSupportUser = true;
    }
}