• myancey
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 15
    Replies

This validation rule woks fine in standard Salesforce  But in the Self Service Portal it displays the error message when Status Begins with 6 and a user tries to enter a comment  

 

AND ( RecordTypeId  = "012800000003VEx",    /* Support Case  */
            ISPICKVAL(Level__c, "Level 2"),
            NOT( ISCHANGED (Level__c)),
            OR ( BEGINS(TEXT(Status),"0"),    
                     BEGINS(TEXT(Status), "1"),  
                     BEGINS(TEXT(Status), "5"),   
                     BEGINS(TEXT(Status), "7")  )  )

This expression returns TRUE when Status = 60-Escalated.  By why?

 

AND ( RecordTypeId  = "012800000003VEx",    /* Support Case  */
            ISPICKVAL(Level__c, "Level 2"),
            NOT ISCHANGED (Level__c),
            OR ( BEGINS(TEXT(Status),"0"),    
                     BEGINS(TEXT(Status), "1"),  
                     BEGINS(TEXT(Status), "5"),   
                     BEGINS(TEXT(Status), "7")  )  )

   

 

Is there a way to expose internal comments to customer portal users?

 

We have a special user group portal where we process enhancement requests.  Only the enh processing team (5 folks) of our user group have access.  Is there a way to expose internal comments to them on this customer portal?

There is something I don't understand going on here.  This validation rule dosen't get triggered if i change the Level from Level 2 to Level 1.

 

AND (  /*   RecordTypeId = "012800000003VEx",                                          Tech Spt Case */
            ISPICKVAL( Level__c , "Level1"),
            ISPICKVAL(PRIORVALUE(Level__c), "Level 2")
         )

 

So, I created a test field "Level - Previous"  [Text 15] and a workfliow/ field update to try to understand why not.

 

ISCHANGED (Level__c)            Workflow rule

PRIORVALUE(Level__c)           Field Update  to Case: Level - Previous

 

When I change the Level, Level - Prevoius contains  a value 1, 2 or 3 with the correct level, but it does not contain the text "Level 1" or "Level 2" or "Level 3" - it just comntains the number 1, 2 or 3.  Why is that?

 

Is this why my workflow isn't firing?

I have created a new Case field LevelLevel has a default value of Level 1 and other picklist values of Level 2 and Level 3.   I would like to make Level required on the page layout, but am concerned that if do this, every time someone brings up an old Case (we have over 80,000), they will have to enter Level 1 to save it.  This is a big pain.  Also, I'd like to develop reports and dashboards based on Level knowing that Level will have one of the 3 valid picklist values and won't be empty.  So, given this background info, my question is:

 

Is there a way make Level = Level 1 for all Cases where Level = null?  

 

Is there a way to run a batch workflow/ field update on all 80,000 records? 

 

I'm looking at an app Mass Update Anything.  Anyone use this?

It appears that this test doesn't cause the trigger to fire.  Please help.

 

Trigger

trigger CaptureLevel1Owner on Case (before update) {
           
      for(Case c: Trigger.new) {
        String caseLevel2 = 'Level 2';
        if (Trigger.isUpdate) {
          if (c.Level__c == caseLevel2) {        
                   if (c.Level_1_Owner__c == null)
              c.Level_1_Owner__c = c.Level_1_Case_Owner_Id__c;
           }
         }
      }
 }

 

Test Class

@isTest
 private class TestCaptureLevel1Owner {
   static testMethod void testLevelTrigger() {
     Case[] myCase = new Case[] { 
         new Case(Subject = 'Trigger Test', Status = '10-Working',
         Level__c = 'Level 1', Level_1_Owner__c = null,
         OwnerId = '00580000001Usii', Level_1_Case_Owner_Id__c = '00580000001Usii' ) } ; 
    insert myCase;
    System.assert(myCase[0].Level_1_Owner__c == null);
    System.assert(myCase[0].Level__c == 'Level 1');
    System.assert(myCase[0].OwnerId == '00580000001Usii');
     
     myCase[0].Level__c = 'Level 2';
    
//   Verify that conditions are set so that trigger will fire    
     System.assert(myCase[0].Level_1_Owner__c == null);
     System.assert(myCase[0].Level__c == 'Level 2');
    
//   and that the Level 1 Owner ID is not empty so there is something for the trigger to load
     System.assert(myCase[0].Level_1_Case_Owner_Id__c != null);
   
     update myCase;
     
//   This should fail since the trigger should have loaded Level 1 Owner,
//   but it doesn't which implies that the trigger isn't firing     
     System.assert(myCase[0].Level_1_Owner__c == null);
           
     
//     System.assertEquals(c.Level_1_Owner__c,c.Level_1_Case_Owner_Id__c);
 
 //    System.assert(c.Level_1_Owner__c == c.Level_1_Case_Owner_Id__c);
     

   }     
 }

Some research has led me to believe it will be much easier to use the IDE instead of Ant to deploy my trigger.  So, I installed the IDE.  Created a new project File->New->Force.com Project selecting Sandbox as the Environment.  So far so good.

 

Now, do I need to re-enter my trigger here or will it find the one I already built in the Sandbox?

 

Assuming I needed to re-create it here using the new project and following an example, I tried to create a new trigger by right clicking the new project. then New-> Apex Trigger.  However, I don't get this option.  When I right click the new project, then New there is no Apex Trigger in the list of choices.  What am I doing wrong?

Stumbling thru examples, I have successfully written and tested my first trigger.   I did this in my Sandbox and now want to deploy it to production.  I've installed the Migration Tool , Ant and Java SDK and done the required configurations.    But, the instructions for using Ant to move move it are too confusing and use too many terms I'm not familiar with.  Plus the Migration Tool User Guide is 25 pages long.  It can't be that complex to move a 6 line trigger from Sandbox to production.   Please help!

This expression returns TRUE when Status = 60-Escalated.  By why?

 

AND ( RecordTypeId  = "012800000003VEx",    /* Support Case  */
            ISPICKVAL(Level__c, "Level 2"),
            NOT ISCHANGED (Level__c),
            OR ( BEGINS(TEXT(Status),"0"),    
                     BEGINS(TEXT(Status), "1"),  
                     BEGINS(TEXT(Status), "5"),   
                     BEGINS(TEXT(Status), "7")  )  )

   

 

There is something I don't understand going on here.  This validation rule dosen't get triggered if i change the Level from Level 2 to Level 1.

 

AND (  /*   RecordTypeId = "012800000003VEx",                                          Tech Spt Case */
            ISPICKVAL( Level__c , "Level1"),
            ISPICKVAL(PRIORVALUE(Level__c), "Level 2")
         )

 

So, I created a test field "Level - Previous"  [Text 15] and a workfliow/ field update to try to understand why not.

 

ISCHANGED (Level__c)            Workflow rule

PRIORVALUE(Level__c)           Field Update  to Case: Level - Previous

 

When I change the Level, Level - Prevoius contains  a value 1, 2 or 3 with the correct level, but it does not contain the text "Level 1" or "Level 2" or "Level 3" - it just comntains the number 1, 2 or 3.  Why is that?

 

Is this why my workflow isn't firing?

I have created a new Case field LevelLevel has a default value of Level 1 and other picklist values of Level 2 and Level 3.   I would like to make Level required on the page layout, but am concerned that if do this, every time someone brings up an old Case (we have over 80,000), they will have to enter Level 1 to save it.  This is a big pain.  Also, I'd like to develop reports and dashboards based on Level knowing that Level will have one of the 3 valid picklist values and won't be empty.  So, given this background info, my question is:

 

Is there a way make Level = Level 1 for all Cases where Level = null?  

 

Is there a way to run a batch workflow/ field update on all 80,000 records? 

 

I'm looking at an app Mass Update Anything.  Anyone use this?

It appears that this test doesn't cause the trigger to fire.  Please help.

 

Trigger

trigger CaptureLevel1Owner on Case (before update) {
           
      for(Case c: Trigger.new) {
        String caseLevel2 = 'Level 2';
        if (Trigger.isUpdate) {
          if (c.Level__c == caseLevel2) {        
                   if (c.Level_1_Owner__c == null)
              c.Level_1_Owner__c = c.Level_1_Case_Owner_Id__c;
           }
         }
      }
 }

 

Test Class

@isTest
 private class TestCaptureLevel1Owner {
   static testMethod void testLevelTrigger() {
     Case[] myCase = new Case[] { 
         new Case(Subject = 'Trigger Test', Status = '10-Working',
         Level__c = 'Level 1', Level_1_Owner__c = null,
         OwnerId = '00580000001Usii', Level_1_Case_Owner_Id__c = '00580000001Usii' ) } ; 
    insert myCase;
    System.assert(myCase[0].Level_1_Owner__c == null);
    System.assert(myCase[0].Level__c == 'Level 1');
    System.assert(myCase[0].OwnerId == '00580000001Usii');
     
     myCase[0].Level__c = 'Level 2';
    
//   Verify that conditions are set so that trigger will fire    
     System.assert(myCase[0].Level_1_Owner__c == null);
     System.assert(myCase[0].Level__c == 'Level 2');
    
//   and that the Level 1 Owner ID is not empty so there is something for the trigger to load
     System.assert(myCase[0].Level_1_Case_Owner_Id__c != null);
   
     update myCase;
     
//   This should fail since the trigger should have loaded Level 1 Owner,
//   but it doesn't which implies that the trigger isn't firing     
     System.assert(myCase[0].Level_1_Owner__c == null);
           
     
//     System.assertEquals(c.Level_1_Owner__c,c.Level_1_Case_Owner_Id__c);
 
 //    System.assert(c.Level_1_Owner__c == c.Level_1_Case_Owner_Id__c);
     

   }     
 }

Stumbling thru examples, I have successfully written and tested my first trigger.   I did this in my Sandbox and now want to deploy it to production.  I've installed the Migration Tool , Ant and Java SDK and done the required configurations.    But, the instructions for using Ant to move move it are too confusing and use too many terms I'm not familiar with.  Plus the Migration Tool User Guide is 25 pages long.  It can't be that complex to move a 6 line trigger from Sandbox to production.   Please help!

I would iike to display the name of the original case owner on the case page after a case is reassigned.  I have created a field Level 1 Owner Id where I capture the original owner id upon reassignment.  But, I have been unable to figure out how to the display the name of the original owner from the id value stored in  Level 1 Owner Id.  There must be a way..  Please help.

  • November 15, 2010
  • Like
  • 0

Is there a way to send an alert email to the case owner if a new email is posted to his/her case?

 

 

  • August 02, 2010
  • Like
  • 0