• PrashantSakhuja
  • NEWBIE
  • 24 Points
  • Member since 2009

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

Looking for Salesforce BA @ Raleigh, NC and Developers @ Milwaukee WI - All Fulltime Positions - Compuware Corporation

 

 

Job Description for Developer at Milwaukee, WI
  1. This position is for Salesforce.com Developer, NOT for BA/Admin
  2. Strong communication skills is REQUIRED
  3. Experience with 2 full Salesforce.com projects is REQUIRED.
  4. Considerable experience on triggers, validation rules, workflows, working with governor limits is REQUIRED.
  5. Some Experience with using Full Sandbox and deployments with ANT OR Eclipse is REQUIRED
  6. Considerable experience with Salesforce.com developer toolkit including Apex Classes, Controllers and Triggers, Visualforce, Force.com IDE, Migration Tool, Web Services. is REQUIRED.
  7. Some experience with technical documentation is REQUIRED
  8. Some experience with SOSL, SOQL and CSS is REQUIRED
  9. Some experience with Customer Portal, Force.com Sites is HELPFUL
  10. Some experience with packages and s-controls is HELPFUL
  11. Some Admin experience is HELPFUL
  12. DEV 401 and DEV 501 certifications are HELPFUL

I am looking for a Visual Force/Apex application or code to allow me to manage account and case heirarchies using drag and drop similar to the image below...

 

We have lot of accounts/cases that need to be linked as parent - child and doing that using lookup field takes lot of time especially when the hierarchies can be deep.

 

Any ideas?

 

I use the app below to view hierarchy but it does not let me edit it.

http://www.salesforce.com/appexchange/detail_overview.jsp?id=a0330000006m4OYAAY

 

 

 

http://i25.tinypic.com/11qhetu.jpg

 

http://i25.tinypic.com/11qhetu.jpg

 

thanks in advance

 

Apex Trigger Error: RECORD TYPE UPDATE: System.NullPointerException: Attempt to de-reference a null object

 

Hi,

I am getting an error message with a trigger on case. Cant figure what I am doing wrong.

Thanks in advance for any help with this.

 

Scenario: Apex Trigger to update record type based on TYPE value on a case. Fetching record type ID where record type name is 'SR'

 

Error on Save:  

Error:Apex trigger Case_Record_Type_Update caused an unexpected exception, contact your administrator: Case_Record_Type_Update: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Case_Record_Type_Update: line 22, column 34

 

I have tried with some changes in the below code but same error each time.

 

CODE:

 

 

trigger Case_Record_Type_Update on Case (before insert, before update) {

   for (Case cs : Trigger.new) {

      if ((Trigger.isInsert | Trigger.isUpdate) && cs!= null){  

          Schema.DescribeSObjectResult DSOR = Schema.SObjectType.Case;          

          Map<String,Schema.RecordTypeInfo> rtMapByName = DSOR.getRecordTypeInfosByName();

      

       if (cs.Type == 'Service Request') {

           if (cs.Status == 'Accept' | cs.Status == 'Disregard') {

             cs.Subject = 'Accept/Disregard';

             Schema.RecordTypeInfo rtByName = rtMapByName.get('SR');

             Id NewRecordTypeforCase = rtByName.getRecordTypeId(); <--- ERROR LINE

             cs.RecordTypeId = NewRecordTypeforCase;

 

         } // End If Accept/Disregard

      } // End If Service Request

 

    } // End If Not NUll check

  } // End For Loop on Case

} // End Trigger Block

 

 

 

 

DEBUG LOG:

 

*** Beginning SetAssetAccount on Case trigger event BeforeUpdate for 500T0000001fVim

20090902190242.983:Trigger.SetAssetAccount: line 8, column 2: SelectLoop:LIST:SOBJECT:Case
20090902190242.983:Trigger.SetAssetAccount: line 18, column 2: >>>>>Changed Asset IDs: {}

Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 0 out of 20
Number of query rows: 0 out of 1000
Number of SOSL queries: 0 out of 0
Number of DML statements: 0 out of 20
Number of DML rows: 0 out of 100
Number of script statements: 6 out of 10200
Maximum heap size: 0 out of 200000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 10
Number of record type describes: 0 out of 10
Number of child relationships describes: 0 out of 10
Number of picklist describes: 0 out of 10
Number of future calls: 0 out of 10
Number of find similar calls: 0 out of 0
Number of System.runAs() invocations: 0 out of 0

Total email recipients queued to be sent : 0
Static variables and sizes:
SetAssetAccount:assetIds:4
SetAssetAccount:idx:4


*** Ending SetAssetAccount on Case trigger event BeforeUpdate for 500T0000001fVim

*** Beginning Case_Record_Type_Update on Case trigger event BeforeUpdate for 500T0000001fVim

20090902190242.991:Trigger.Case_Record_Type_Update: line 2, column 2: SelectLoop:LIST:SOBJECT:Case
System.NullPointerException: Attempt to de-reference a null object

Trigger.Case_Record_Type_Update: line 22, column 34


Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 0 out of 20
Number of query rows: 0 out of 1000
Number of SOSL queries: 0 out of 0
Number of DML statements: 0 out of 20
Number of DML rows: 0 out of 100
Number of script statements: 11 out of 10200
Maximum heap size: 0 out of 200000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 10
Number of record type describes: 1 out of 10
Number of child relationships describes: 0 out of 10
Number of picklist describes: 0 out of 10
Number of future calls: 0 out of 10
Number of find similar calls: 0 out of 0
Number of System.runAs() invocations: 0 out of 0

Total email recipients queued to be sent : 0
Stack frame variables and sizes:
  Frame0
    rtByName:0
    rtMapByName:326
    cs:0
    DSOR:153


*** Ending Case_Record_Type_Update on Case trigger event BeforeUpdate for 500T0000001fVim

 

 

thanks

Prashant

 

Edit 1 and 2: Added intend on Code snippet.

 
Message Edited by PrashantSakhuja on 09-02-2009 04:42 PM
Message Edited by PrashantSakhuja on 09-02-2009 04:43 PM

Looking for Salesforce BA @ Raleigh, NC and Developers @ Milwaukee WI - All Fulltime Positions - Compuware Corporation

 

 

Job Description for Developer at Milwaukee, WI
  1. This position is for Salesforce.com Developer, NOT for BA/Admin
  2. Strong communication skills is REQUIRED
  3. Experience with 2 full Salesforce.com projects is REQUIRED.
  4. Considerable experience on triggers, validation rules, workflows, working with governor limits is REQUIRED.
  5. Some Experience with using Full Sandbox and deployments with ANT OR Eclipse is REQUIRED
  6. Considerable experience with Salesforce.com developer toolkit including Apex Classes, Controllers and Triggers, Visualforce, Force.com IDE, Migration Tool, Web Services. is REQUIRED.
  7. Some experience with technical documentation is REQUIRED
  8. Some experience with SOSL, SOQL and CSS is REQUIRED
  9. Some experience with Customer Portal, Force.com Sites is HELPFUL
  10. Some experience with packages and s-controls is HELPFUL
  11. Some Admin experience is HELPFUL
  12. DEV 401 and DEV 501 certifications are HELPFUL

Apex Trigger Error: RECORD TYPE UPDATE: System.NullPointerException: Attempt to de-reference a null object

 

Hi,

I am getting an error message with a trigger on case. Cant figure what I am doing wrong.

Thanks in advance for any help with this.

 

Scenario: Apex Trigger to update record type based on TYPE value on a case. Fetching record type ID where record type name is 'SR'

 

Error on Save:  

Error:Apex trigger Case_Record_Type_Update caused an unexpected exception, contact your administrator: Case_Record_Type_Update: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Case_Record_Type_Update: line 22, column 34

 

I have tried with some changes in the below code but same error each time.

 

CODE:

 

 

trigger Case_Record_Type_Update on Case (before insert, before update) {

   for (Case cs : Trigger.new) {

      if ((Trigger.isInsert | Trigger.isUpdate) && cs!= null){  

          Schema.DescribeSObjectResult DSOR = Schema.SObjectType.Case;          

          Map<String,Schema.RecordTypeInfo> rtMapByName = DSOR.getRecordTypeInfosByName();

      

       if (cs.Type == 'Service Request') {

           if (cs.Status == 'Accept' | cs.Status == 'Disregard') {

             cs.Subject = 'Accept/Disregard';

             Schema.RecordTypeInfo rtByName = rtMapByName.get('SR');

             Id NewRecordTypeforCase = rtByName.getRecordTypeId(); <--- ERROR LINE

             cs.RecordTypeId = NewRecordTypeforCase;

 

         } // End If Accept/Disregard

      } // End If Service Request

 

    } // End If Not NUll check

  } // End For Loop on Case

} // End Trigger Block

 

 

 

 

DEBUG LOG:

 

*** Beginning SetAssetAccount on Case trigger event BeforeUpdate for 500T0000001fVim

20090902190242.983:Trigger.SetAssetAccount: line 8, column 2: SelectLoop:LIST:SOBJECT:Case
20090902190242.983:Trigger.SetAssetAccount: line 18, column 2: >>>>>Changed Asset IDs: {}

Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 0 out of 20
Number of query rows: 0 out of 1000
Number of SOSL queries: 0 out of 0
Number of DML statements: 0 out of 20
Number of DML rows: 0 out of 100
Number of script statements: 6 out of 10200
Maximum heap size: 0 out of 200000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 10
Number of record type describes: 0 out of 10
Number of child relationships describes: 0 out of 10
Number of picklist describes: 0 out of 10
Number of future calls: 0 out of 10
Number of find similar calls: 0 out of 0
Number of System.runAs() invocations: 0 out of 0

Total email recipients queued to be sent : 0
Static variables and sizes:
SetAssetAccount:assetIds:4
SetAssetAccount:idx:4


*** Ending SetAssetAccount on Case trigger event BeforeUpdate for 500T0000001fVim

*** Beginning Case_Record_Type_Update on Case trigger event BeforeUpdate for 500T0000001fVim

20090902190242.991:Trigger.Case_Record_Type_Update: line 2, column 2: SelectLoop:LIST:SOBJECT:Case
System.NullPointerException: Attempt to de-reference a null object

Trigger.Case_Record_Type_Update: line 22, column 34


Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 0 out of 20
Number of query rows: 0 out of 1000
Number of SOSL queries: 0 out of 0
Number of DML statements: 0 out of 20
Number of DML rows: 0 out of 100
Number of script statements: 11 out of 10200
Maximum heap size: 0 out of 200000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 10
Number of record type describes: 1 out of 10
Number of child relationships describes: 0 out of 10
Number of picklist describes: 0 out of 10
Number of future calls: 0 out of 10
Number of find similar calls: 0 out of 0
Number of System.runAs() invocations: 0 out of 0

Total email recipients queued to be sent : 0
Stack frame variables and sizes:
  Frame0
    rtByName:0
    rtMapByName:326
    cs:0
    DSOR:153


*** Ending Case_Record_Type_Update on Case trigger event BeforeUpdate for 500T0000001fVim

 

 

thanks

Prashant

 

Edit 1 and 2: Added intend on Code snippet.

 
Message Edited by PrashantSakhuja on 09-02-2009 04:42 PM
Message Edited by PrashantSakhuja on 09-02-2009 04:43 PM