function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RomyRomy 

How to restrict users from editing cases in queue

I am new to salesforce and using Email to case to register new cases. Once the case is registered it moves from one department to another before it is closed. This is done by changing the Lookup field Department__c (Lookup to custom object Department_List__c ) on Case. Each time dept is changed, a record is inserted in the Dept_move__c custome object Which is detail with Case as master.

 

 

My Questions are:

 

When the user in 1st department assign the case to another 2nd dept (only lookup field   Department__c is changed ..not the case owner) then Is it possible that the user in 2nd department can be allowed to change only Department__c fields and add comments. And all other fields on the case detail page remains locked (just as standard field Lastmodified by -- with lock sign) However the owner (in 1st department) can still make changes to to any field of that case? .... I need something that can lock all the fields on case except few ones for the user in 2nd dept if he or any of the member of his dept is not the case owner but the case is assigned to their department? 

 

 

Also, In my current scenario..users in different department first picks / Accept the cases from corresponding queue (one Queue for every department)...however right now they are able to change any field on the case in queue without accepting them.......I need that they should be able to edit  any field on case only when they are the owner. Is it possible to restrict them from editing anything on the case when it is still in the queue. that is all the fields will appear locked to them when the case is in the queue. I know we can lock the fields on the user profile. Is it possibel to assign profile to the queue?? 

 

 

Another possible scenario is: I should allow the user to edit any field on the queue of which they are the member, but as soon as they edit anything on the case they become the owner of the case...Can you suggest how to implement this? 

 

 

 I will appretiate if anyone help me reolve these probblems?

Message Edited by Romy on 02-14-2010 05:46 PM
Best Answer chosen by Admin (Salesforce Developers) 
werewolfwerewolf

Make a validation rule that looks like

 

LEFT(OwnerId,3)<>"005"

 

User IDs all start with 005.  This validation rule will violate if someone tries to make an edit and the owner ID is anything other than a user.  This is off the top of my head though -- you'll want to test this to ensure that it doesn't ensnare people actually trying to take ownership of the case.  However I think that will work fine.

All Answers

werewolfwerewolf

Make a validation rule that looks like

 

LEFT(OwnerId,3)<>"005"

 

User IDs all start with 005.  This validation rule will violate if someone tries to make an edit and the owner ID is anything other than a user.  This is off the top of my head though -- you'll want to test this to ensure that it doesn't ensnare people actually trying to take ownership of the case.  However I think that will work fine.

This was selected as the best answer
werewolfwerewolf

If you want to exempt some fields you can do that too by putting NOT(ISCHANGED()) in there, like

 

AND(

NOT(

ISCHANGED(Department__c)

),

LEFT(OwnerId,3)<>"005"

)