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 

Change case Page Layout When re opening a closed case using Email To case

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__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. When the case is closed, it is assigned a new page layout -- Closed Case Page Layout that has no Close Case Button and also email is sent to the customer with case details. If customer feels that the problem is still pending, he can reply to that and it will automatically reopen the case. I have already implemented this functionality through after update trigger on Case.

 

Now what I need is this -- When the case reopens, It's page layout should change automatically from Closed one to the one that is used by the Workgroup which received the case for the first time when it was registered. Can any one tell me how I should proceed -- should I use some trigger for this Or Some Work Flow Process. If some one provide me some sample code, I will highly appreciate.

Message Edited by Romy on 02-14-2010 05:30 PM
Best Answer chosen by Admin (Salesforce Developers) 
werewolfwerewolf
In Salesforce.com the page layout is defined by 2 things: the user's profile and the record type.  In your case, someone probably made a workflow which changes the record type of the case once it's closed.  The page layout will change accordingly.  What you need to do, therefore, is make a similar workflow which, when the case's status is changed to an open status, does a field update that sets the record type back to the original record type (which is probably the default).

All Answers

werewolfwerewolf
In Salesforce.com the page layout is defined by 2 things: the user's profile and the record type.  In your case, someone probably made a workflow which changes the record type of the case once it's closed.  The page layout will change accordingly.  What you need to do, therefore, is make a similar workflow which, when the case's status is changed to an open status, does a field update that sets the record type back to the original record type (which is probably the default).
This was selected as the best answer
RomyRomy
Thanks for ur help.....It is really useful