• Romy
  • NEWBIE
  • 5 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 7
    Replies

I need to remove Edit | Delete Link from the Case Object's list view page (One that you get after selecting a view from dropdown on Case Tab page ). I tried to use <apex:listview>  or  <apex:enhancedlist> to create new list view but I don't get options to remove the ACtion Colums that has liks for Edit | Delete  for each records on the list. So, I decided to design the whole page using Pageblock table and iterating the case records using recordSetVar =" "  attribute. My problem is I Can't understand how to proceed to implement the logic for Accept button. --- It changes the Case Owner from currnt queue to the current user..when user clicks it after selecting few cases. I think I am doing something wrong with the code. It is just refreshing the case. Not doing anything.

 

Can anyone please help me on this?..If this not the right way, then can someone suggest how to proceed...??

 

<apex:page standardController="Case" recordSetVar="cases" extensions="CustomCaseListController" tabStyle="Case_List_View_Tab__tab" > 

    <apex:outputPanel id="keywordheaderPanel" layout="block" style="border: solid 0px red; width: 100%; margin: 0px; text-align: left; height:40px;">
            <apex:sectionHeader subtitle="Cases"  />
      </apex:outputPanel>
    <apex:pageBlock > 
        <apex:form id="theForm">
            
            <apex:panelGrid columns="4" >
                <apex:outputLabel value="View:"/>
                <apex:selectList value="{!filterId}" size="1">
                    <apex:actionSupport event="onchange" rerender="list"/>
                    <apex:selectOptions value="{!listviewoptions}"/>
                </apex:selectList>
                
                <apex:commandButton value="Accept" title="Accept" action="{!acceptCase}" />  <!-- This is the button in question --> 
                <apex:commandButton value="New Case" action="/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F500%2Fo&save_new_url=%2F500%2Fe%3FretURL%3D%252F500%252Fo" />
            </apex:panelGrid>
            
            <apex:pageBlockSection title="Cases" id="list2" columns="1" collapsible="false">
                <apex:pageBlockTable value="{!cases}" var="c" id="list" rules="col">
                
                    <apex:column headerValue="Action"> 
                    <apex:selectCheckboxes id="chkboxid">
                        </apex:selectCheckboxes>
                    </apex:column>
                    
                    <apex:column id="caseId" headerValue="Case Number" >
                        <apex:commandLink action="/{!c.Id}" value="{!c.CaseNumber}" /> 
                        <apex:param assignTo="{!caseId}" value="{!c.Id}" />
                    </apex:column>
                    
                    <apex:column headerValue="Case Subject" > 
                        <apex:commandLink value="{!c.Subject}" /> 
                    </apex:column>

                    <apex:column value="{!c.CreatedById}" />
                    <apex:column value="{!c.Priority}" />
                    <apex:column value="{!c.Status}" />
                    <apex:column value="{!c.Contact.Name}" />
                    <apex:column value="{!c.Account.Name}" />
                    <apex:column value="{!c.CreatedDate}" />
                
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:form>
    </apex:pageBlock>
</apex:page>

 

public with sharing class CustomCaseListController {
    public ApexPages.standardcontroller Controller {get;set;}
    Public String caseId {get; set;}
    public ApexPages.standardSetController setcOntroller{get;set;}
    
    //List<Case> caseId = new List<Case>();
    public Case c { get; set; }
    
    public CustomCaseListController(ApexPages.StandardSetController controller) {
        this.setcOntroller = controller;
    }
    
    public CustomCaseListController(ApexPages.StandardController stdController) {        
        // constructor        
        Controller = stdController;        
        this.c = (Case)stdController.getRecord();    
        }
    
    
     public PageReference acceptCase() { 
         //Can't understand what to write there???  
         system.debug('selected values: ' +setcOntroller.getSelected());
         return null;
     } 
    
}

 

  • May 15, 2010
  • Like
  • 0

Hi,

 

Can any one help me to figure out-- How to Add Custom Button to the Page that displays when you click on the Tab of Page. Like on Case Tab Page we have Button Called "NEW". Is oit possible to display a custom button there. I created one custom button for displaying New Case Creation Page using Content Source == "On Click Javascript". Here's the code:

 

{!URLFOR( $Action.Case.NewCase)};

 

I have 2 problems with this button:

 

1.

Added it to Related List on Account Detail Page. This button appears in the Case Related Lisyt on Account. BUT do not show up on the Case List View Page (i.e. the page that shows up when you click on the Case Tab). Is there any way to add it there.

 

2.

Also, the one that appears on the Related list is not working. When clicked it givess error: -- "A problem with the OnClick Javascript for this button or link was encountered: Expected ; "

 

Can anyone please suggest wht's wrong there and how to get it work.

 

  • April 30, 2010
  • Like
  • 0

I need to change the Case tab name to something else for Customer Portal users only, not for internal users in the Salesforce Org. So that when Customer Portal users login, they will see Ticket as Tab Name for Cases and when internal Salesforce users login to Org they will See Cases as Tab Name.

 

I tried the following Java Script to create S Control (just this script no other HTML Tag with in Script) and --> used that S Control to create a Web Tab and then --> Included this Tab as paert of Customer Portal Tabs (using customize Tab Button in Customer Portal Setup). It displays the Case Page work fine for creating and viewing cases. ONLY problem is: When I select the Ticket Tab, it does not get highlighted and appear unselected. I think I am missing something, but can't understand what?

 

Can anyone help me on this or suggest some other way arround.

 

<script type="text/javascript">
top.location.href="/500/o";
</script>

 

 

  • April 22, 2010
  • Like
  • 0

Categories appear as related list on solution detail page and to assign a category to solution we have to do it mannually for each solution on it's detail page. If I am importing 200 solutions through Solution Import Wizard, it will be very tedious to assign category mannually to each of them. I am wondering is there any way to assign category and subcategory to solution at the time of import. Solutions support the trigger functionality but I can't access any child field on category (under solution child relationships) through Salesforce Schema in Eclipse.

 

I'll appreciate if some one can help me figure out some way around to assign one or multiple categories to solution at the time of import. 

 

  • April 09, 2010
  • Like
  • 0

I have created an on demand Email to Case that that creates a new case. It fires before insert trigger on case  to auto populate some fields depending on the case record type in the On demand email to case. This is ok..and according to what I need. However, Problem is -- it is also firing the before update triggers...Which It should not. This trigger didn't fire ...when the case is created mannually.

 

Can some one suggest how to prevent firing of before update trigger when the case is created for the first time by Email to case ??? I am using proper Trigger.Isbefore conditions

 

I am using Assignment rules that that transfer the Case to proper queues depending on the case record types.....Is this before update trigger gets fired because of these Assignment Rules as they are changing the Case Owner to Queue ?

 

Who will be the Owner of Case before they are assigned to queue.....and How to check them through some If condition that I can include in this trigger so that it will not fire at the time of case creation through Email to Case.

 

Any help will be appretiated

  • February 26, 2010
  • Like
  • 0

Here I am preventing the case owner to be changed..by using triggers...by writing --  cc[0].OwnerId = Trigger.old[0].OwnerId;   

 

After this Even in Debug Logs, Old and new owner Id's are same and are equal to that of  Trigger.Old[0].OwnerId  ..... but In page layout after saving the case...Case Owner has te name of new owner?????

 

Can you suggest how to prevent the case owner from being changed ....And I don't want to through an error message.

 

if(!WGQueueName.isEmpty()){ System.Debug('Inside WGQueueName not Empty'); assignedCaseMetric = new Case_Metrics__c (Case__c = caseID, Workgroup__c = WGQueueName[0].Name, CS_Case_Status__c = 'To Queue', Assigned_Date_Time__c = datetime.now()); System.Debug('WorkGroup Name: ' +WGQueueName[0].Name +'\t WG Queue Name: ' +WGQueueName[0].Workgroup_Queue__c); if(assignedCaseMetric != Null){ Insert assignedCaseMetric; }

cc[0].CS_Workgroup__c = WGQueueName[0].Id; cc[0].Workgoup_Email2__c = WGQueueName[0].Workgroup_Email__c; }

else{ System.Debug('Inside else when WGQueueName is Empty'); QueueSobject[] qq =[Select q.SobjectType, q.Queue.Name, q.QueueId, q.Id From QueueSobject q Where SobjectType = 'Case' AND q.QueueId =: Trigger.old[0].OwnerId]; System.Debug('Old Owner ID: ' +Trigger.old[0].OwnerId +'\t New Owner Id: ' +Trigger.new[0].OwnerId); cc[0].OwnerId = qq[0].QueueId;

System.Debug('Old Owner ID: ' +cc[0].OwnerId +'\t New Owner Id: ' +Trigger.new[0].OwnerId); } System.Debug('Old Owner ID: ' +cc[0].OwnerId +'\t New Owner Id: ' +Trigger.new[0].OwnerId); Debug Logs: 20100225032713.945:Trigger.UpdateCaseMetric: line 149, column 25: Inside else when WGQueueName is Empty 20100225032713.945:Trigger.UpdateCaseMetric: line 150, column 44: SOQL query with 1 row finished in 12 ms 20100225032713.945:Trigger.UpdateCaseMetric: line 154, column 29: Old Owner ID: 00G70000001CrsvEAC New Owner Id: 00G70000001U0D4EAK 20100225032713.945:Trigger.UpdateCaseMetric: line 156, column 29: Old Owner ID: 00G70000001CrsvEAC New Owner Id: 00G70000001CrsvEAC 20100225032713.945:Trigger.UpdateCaseMetric: line 160, column 29: Old Owner ID: 00G70000001CrsvEAC New Owner Id: 00G70000001CrsvEAC

  • February 25, 2010
  • Like
  • 0

I am 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. For this record insert part I have written a Trigger it is working good. I have 2 more things here that I need to implement but don't know how to implement them and will appreciate if some one can help.

 

1.  Sometimes a department person needs some more information from the customer and they send the e mail to the customer and change the case Status Field (picklist)  to - 'Waiting On Customer'. Now when the customer replied to the email, I need that Case Status should automatically changed to 'Open'. I know this can be implemented through Workflow but can't figure out the criteria Or rule for this as customer can send email for registering the new case,and can reply to a Closed Case Email for reopening an old Closed case if he thinks that issue is still there While the recently opened case is in 'Waiting on Customer' Status.

 

So the issue is -- When the customer send the Email, It can be for:

 

1.  Open a New case -- This I have implemented with Email to case functionality and working Good.

 

2.  Re Open a Closed Case Change Status field to -- 'Reopened'

 

3.  Chnage the Case Status from 'Waiting on Customer' to 'Open'  -- When the customer replied to the mail providing the information whatever needed by the customer care.

 

My 1st main problem is how to distinguish Weather the mail is for changing the status or re opening an old case. and 2nd problem is how to implement this functionality.

 

Will appreciate if someone help...!!!

  • February 21, 2010
  • Like
  • 0

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
  • February 15, 2010
  • Like
  • 0

I an 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.

 

It work fine with single case update but I need to modify it so that it can work for multiple or bulk case updates. Can anyone suggest me what point i should consider while updating the trigger for handling bulk cases:

 

Message Edited by Romy on 02-14-2010 05:22 PM
  • February 07, 2010
  • Like
  • 0

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
  • February 07, 2010
  • Like
  • 0

I have an Approval process.

I want to give two different approval email notification to both the approvers. i.e 1 to first one and second different notification to 2nd approver.

Is this possible?

Categories appear as related list on solution detail page and to assign a category to solution we have to do it mannually for each solution on it's detail page. If I am importing 200 solutions through Solution Import Wizard, it will be very tedious to assign category mannually to each of them. I am wondering is there any way to assign category and subcategory to solution at the time of import. Solutions support the trigger functionality but I can't access any child field on category (under solution child relationships) through Salesforce Schema in Eclipse.

 

I'll appreciate if some one can help me figure out some way around to assign one or multiple categories to solution at the time of import. 

 

  • April 09, 2010
  • Like
  • 0

Here I am preventing the case owner to be changed..by using triggers...by writing --  cc[0].OwnerId = Trigger.old[0].OwnerId;   

 

After this Even in Debug Logs, Old and new owner Id's are same and are equal to that of  Trigger.Old[0].OwnerId  ..... but In page layout after saving the case...Case Owner has te name of new owner?????

 

Can you suggest how to prevent the case owner from being changed ....And I don't want to through an error message.

 

if(!WGQueueName.isEmpty()){ System.Debug('Inside WGQueueName not Empty'); assignedCaseMetric = new Case_Metrics__c (Case__c = caseID, Workgroup__c = WGQueueName[0].Name, CS_Case_Status__c = 'To Queue', Assigned_Date_Time__c = datetime.now()); System.Debug('WorkGroup Name: ' +WGQueueName[0].Name +'\t WG Queue Name: ' +WGQueueName[0].Workgroup_Queue__c); if(assignedCaseMetric != Null){ Insert assignedCaseMetric; }

cc[0].CS_Workgroup__c = WGQueueName[0].Id; cc[0].Workgoup_Email2__c = WGQueueName[0].Workgroup_Email__c; }

else{ System.Debug('Inside else when WGQueueName is Empty'); QueueSobject[] qq =[Select q.SobjectType, q.Queue.Name, q.QueueId, q.Id From QueueSobject q Where SobjectType = 'Case' AND q.QueueId =: Trigger.old[0].OwnerId]; System.Debug('Old Owner ID: ' +Trigger.old[0].OwnerId +'\t New Owner Id: ' +Trigger.new[0].OwnerId); cc[0].OwnerId = qq[0].QueueId;

System.Debug('Old Owner ID: ' +cc[0].OwnerId +'\t New Owner Id: ' +Trigger.new[0].OwnerId); } System.Debug('Old Owner ID: ' +cc[0].OwnerId +'\t New Owner Id: ' +Trigger.new[0].OwnerId); Debug Logs: 20100225032713.945:Trigger.UpdateCaseMetric: line 149, column 25: Inside else when WGQueueName is Empty 20100225032713.945:Trigger.UpdateCaseMetric: line 150, column 44: SOQL query with 1 row finished in 12 ms 20100225032713.945:Trigger.UpdateCaseMetric: line 154, column 29: Old Owner ID: 00G70000001CrsvEAC New Owner Id: 00G70000001U0D4EAK 20100225032713.945:Trigger.UpdateCaseMetric: line 156, column 29: Old Owner ID: 00G70000001CrsvEAC New Owner Id: 00G70000001CrsvEAC 20100225032713.945:Trigger.UpdateCaseMetric: line 160, column 29: Old Owner ID: 00G70000001CrsvEAC New Owner Id: 00G70000001CrsvEAC

  • February 25, 2010
  • Like
  • 0

I an 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.

 

It work fine with single case update but I need to modify it so that it can work for multiple or bulk case updates. Can anyone suggest me what point i should consider while updating the trigger for handling bulk cases:

 

Message Edited by Romy on 02-14-2010 05:22 PM
  • February 07, 2010
  • Like
  • 0

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
  • February 07, 2010
  • Like
  • 0

I have an APEX Trigger that runs when a Task is created/updated, so it can update the related Case. 

 

Somehow, the trigger is causing the Case Assignment Rules to re-fire, but I don't know what.  Any thoughts?

 

 

 

trigger caseLastActivityDate on Task (after insert, after update) { Map<String, Task> tMap = new Map<String, Task>(); for (Task t : System.Trigger.new) { String whatId = t.WhatId; System.debug('whatId is ' + whatId); if(whatId <> null && whatId.startsWith('500') == true) { Case c = [select Id from Case where Id = :whatId]; if(c.Id <> null) { c.Last_Activity_Date__c = t.LastModifiedDate; update c; } } } }