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
Saravanan @CreationSaravanan @Creation 

DEBUG the apex code in installed package-Urgent

Hi All,

 

In my client sandbox org I  have intalled my package.

 

Assume in the package there is one VF page called XX  and Contoller for this page is YY.

this page is used to create the new record for one custom object .There is one save button in the XX page.

 

Right now the save button is not working. I have tried with the 'developer console'  and 'debug'

but i couldn't see any error in the log and also not much info in the log.

 

Please help how to get the error message in the Log.

 

Thanks in advance.

 

S ShawS Shaw

HI 

What I can understand is, you are not getting any error on the VF page and the Button is also not working. Looking at the Debug Log, you are not able to find any error.

 

Can you check the Below:

1. Check if the method called by the Button is Comming in the Debug Log or Not.

2. Check whether there is any Javascript Error on the page.

3. Also can you attach the Debug Log for reference.

 

 

 

If this answers your question please mark it as solved.

Saravanan @CreationSaravanan @Creation

Hi ,

 

Thanks for your quick reply.

 

1.I can get the log after clicking the save button.

2.There is no javaScript on the page.

3. Actually in the the log i can see only some line are excuted but i can't get the error.

 

 

please help me to get the error in the log.

S ShawS Shaw

Without looking at the Code and Debug Log I can not help you. I need to check the code and map the Log.

Saravanan @CreationSaravanan @Creation

Hi 

 

we can't  post the code.but the code is in installed pacakage.

 

27.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
11:23:53.062 (62962000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.063 (63024000)|VARIABLE_SCOPE_BEGIN|[2]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.063 (63085000)|VARIABLE_ASSIGNMENT|[2]|this|{}|0x5fe9c11d
11:23:53.070 (70052000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.070 (70069000)|VARIABLE_SCOPE_BEGIN|[79]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.070 (70106000)|VARIABLE_ASSIGNMENT|[79]|this|{}|0x5fe9c11d
11:23:53.070 (70115000)|VARIABLE_SCOPE_BEGIN|[79]|escape|Boolean|false|false
11:23:53.070 (70127000)|VARIABLE_ASSIGNMENT|[79]|escape|null
11:23:53.093 (93446000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
11:23:53.093 (93476000)|VARIABLE_SCOPE_BEGIN|[9]|this|XCDHRMS.BookOvertimeController|true|false
11:23:53.093 (93534000)|VARIABLE_ASSIGNMENT|[9]|this|{}|0x44bfd5cb
11:23:53.099 (99563000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.099 (99579000)|VARIABLE_SCOPE_BEGIN|[79]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.099 (99620000)|VARIABLE_ASSIGNMENT|[79]|this|{}|0x5fe9c11d
11:23:53.099 (99630000)|VARIABLE_SCOPE_BEGIN|[79]|escape|Boolean|false|false
11:23:53.099 (99640000)|VARIABLE_ASSIGNMENT|[79]|escape|null
11:23:53.101 (101941000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:15
11:23:53.101 (101955000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
11:23:53.101 (101984000)|VARIABLE_ASSIGNMENT|[-1]|this.selectedReason|"Office overtime"|0x44bfd5cb
11:23:53.105 (105229000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
11:23:53.105 (105258000)|VARIABLE_SCOPE_BEGIN|[61]|this|XCDHRMS.BookOvertimeController|true|false
11:23:53.105 (105307000)|VARIABLE_ASSIGNMENT|[61]|this|{}|0x44bfd5cb
11:23:53.116 (116304000)|SOQL_EXECUTE_BEGIN|[81]|Aggregations:0|select id, name, XCDHRMS__Employee_Details__c, Employee_Details__r.Name, XCDHRMS__Leave_Month__c, XCDHRMS__Leave_Year__c, XCDHRMS__Adjustment_Notes__c from Overtime_Record__c where (Employee_Details__c = :tmpVar1 and Leave_Month__c = :tmpVar2 and Leave_Year__c = :tmpVar3) limit 1
11:23:53.125 (125708000)|SOQL_EXECUTE_END|[81]|Rows:0
11:23:53.152 (152186000)|SOQL_EXECUTE_BEGIN|[241]|Aggregations:0|select id, Employee_Name__r.Account.Id from Employee_Detail__c where id = :tmpVar1
11:23:53.188 (188727000)|SOQL_EXECUTE_END|[241]|Rows:1
11:23:53.255 (255029000)|SOQL_EXECUTE_BEGIN|[242]|Aggregations:0|select name, XCDHRMS__Holiday_Date__c, XCDHRMS__Company__c from Company_Holidays__c where (Company__c = :tmpVar1 and Company_Holiday_Year__r.Name = :tmpVar2)
11:23:53.262 (262735000)|SOQL_EXECUTE_END|[242]|Rows:8
11:23:53.268 (268727000)|SOQL_EXECUTE_BEGIN|[241]|Aggregations:0|select id, Employee_Name__r.Account.Id from Employee_Detail__c where id = :tmpVar1
11:23:53.284 (284927000)|SOQL_EXECUTE_END|[241]|Rows:1
11:23:53.286 (286166000)|SOQL_EXECUTE_BEGIN|[242]|Aggregations:0|select name, XCDHRMS__Holiday_Date__c, XCDHRMS__Company__c from Company_Holidays__c where (Company__c = :tmpVar1 and Company_Holiday_Year__r.Name = :tmpVar2)
11:23:53.292 (292296000)|SOQL_EXECUTE_END|[242]|Rows:8
11:23:53.373 (373177000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.373 (373204000)|VARIABLE_SCOPE_BEGIN|[79]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.373 (373263000)|VARIABLE_ASSIGNMENT|[79]|this|{}|0x5fe9c11d
11:23:53.373 (373272000)|VARIABLE_SCOPE_BEGIN|[79]|escape|Boolean|false|false
11:23:53.373 (373283000)|VARIABLE_ASSIGNMENT|[79]|escape|null
11:23:53.373 (373627000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.373 (373644000)|VARIABLE_SCOPE_BEGIN|[2]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.373 (373686000)|VARIABLE_ASSIGNMENT|[2]|this|{}|0x5fe9c11d
11:23:53.395 (395544000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.395 (395562000)|VARIABLE_SCOPE_BEGIN|[79]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.395 (395601000)|VARIABLE_ASSIGNMENT|[79]|this|{}|0x5fe9c11d
11:23:53.395 (395610000)|VARIABLE_SCOPE_BEGIN|[79]|escape|Boolean|false|false
11:23:53.395 (395619000)|VARIABLE_ASSIGNMENT|[79]|escape|null
11:23:53.396 (396030000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
11:23:53.396 (396045000)|VARIABLE_SCOPE_BEGIN|[2]|this|ApexPage.PageMessagesComponentController|true|false
11:23:53.396 (396081000)|VARIABLE_ASSIGNMENT|[2]|this|{}|0x5fe9c11d
11:23:53.411 (411163000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
11:23:53.411 (411185000)|VARIABLE_SCOPE_BEGIN|[9]|this|XCDHRMS.BookOvertimeController|true|false
11:23:53.411 (411223000)|VARIABLE_ASSIGNMENT|[9]|this|{}|0x44bfd5cb
11:23:53.687 (424123000)|CUMULATIVE_LIMIT_USAGE
11:23:53.687|LIMIT_USAGE_FOR_NS|XCDHRMS|
Number of SOQL queries: 5 out of 100
Number of query rows: 18 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 0 out of 150
Number of DML rows: 0 out of 10000
Number of code statements: 101 out of 200000
Maximum heap size: 0 out of 6000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10

11:23:53.687|CUMULATIVE_LIMIT_USAGE_END

 

S ShawS Shaw

Thanks for sharing the Log.

 

Not much help with that. What I can think is, there might be some Condition on line no: 79 or so. Please check the conditions in the code (hope you have it at your end if its your package) and may be possible that the conditions are not matching and hence the code is not proceeding further.

 

There was no Error in the execution.

 

Saravanan @CreationSaravanan @Creation

Thanks for the reply.

 

whether there is any way to get the error in the log.

 

I am thinking that can we use the 'Log filter' of the class to get the error.

S ShawS Shaw

Looking at the Log that you have attached, I think it has the maximum level set. Hence you would not be able to see the Error in the Log.

According to me it is not hitting any error / exception. Rather due to some condition mismatch it is not executing the Code. You need to check the conditions OR the If-else clause in the code and check with the Record that you are working on.