• Romy
  • NEWBIE
  • 5 Points
  • Member since 2010

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

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. 

 

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

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

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

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; } } } }