System.LimitException: Apex CPU time limit exceeded in developer console

I am having 3.5k records but while executing the code i get System.LimitException: Apex CPU time limit exceeded Although i need to update only 360 records whose duplicate__c is true. List<Account> act = new List<Account>(); for(Account accou: [select name,duplicate__c from account where duplicate__c=true]) { accou.duplicate__c=false; act.add(accou); update act; } Answer You need to update records … Read more

SymbolTable not supported

I am trying to find the unused methods using the Query Editor in Developer Console. I have checked Use Tooling API. Running SOQL like below: SELECT Id FROM SymbolTable WHERE externalReferences = NULL But getting this error: SELECT Id FROM SymbolTable WHERE externalReferences ^ ERROR at Row:1:Column:16 sObject type ‘SymbolTable’ is not supported. If you … Read more

Test Class for PDF Reader Trigger

I have written one trigger for a PDF reader and Case creation based on that PDF. Now I am trying to coverage by the Test Class but it is showing only 0% Coverage. Can anyone please help me with the Coverage, Let me know Where I am getting Wrong? Apex Trigger:- trigger InitiateProcess on Project__c … Read more

Developer Console

While I open the Developer Console, I can see the below options under ‘Debug’ are disabled: Switch Perspective View Log Panels Save Perspective Could some one guide, how this can be enabled? Answer As far as I know Switch Perspective will only be available when we open a log in the console. After you open … Read more

can not access parent fields on a master detail

I need to an object and modify it’s parent if condition are fullfiled but i’m encoutering an wierd behavior: in my SOQL the __r.field doesn’t retrieve the fields values: Below my anonymous code: list<FLU_PaymentDeadline__c> pdl = [Select FLU_Contract__r.Name, FLU_Contract__r.FLU_ReviewAutoPay__c, SystemModstamp, FLU_PaymentMeans__c FROM FLU_PaymentDeadline__c where FLU_PaymentMeans__c = ‘CB’]; system.debug(pdl); My debug is the following I can … Read more

How to create a Lead with a custom record type?

I’m trying to test a workflow rule made, and I’m trying to insert some Leads, with determined Recordtypes to cover all test scenarios. In Dev Console/IDE, how to create a Lead with a custom Record type? Is it possible to create with the RT Name? Thanks! Answer In Developer Console you can do the following … Read more

Salesforce Apache Pulsar integration

I’m starting a project where we will be using Apache Pulsar as a messaging platform and going with an event driven integration pattern between Sales Cloud and and external systems (Finance, HR, etc). I understand that there is also a Salesforce Event Platform available. Can anyone advise on whether I should use the Salesforce event … Read more

Error: Compile Error: Extra ‘)’,

I’m trying to call My apex class in Test calss at that time I got an error. Please anyone help me to resolve. Test Calss @isTest private class UnplannedCallsTest{ @isTest static void caluclateEndDateTime(){ //Create an US User Profile p = [SELECT Id FROM Profile WHERE Name=’US Livestock Rep’]; User u = new User(Alias = ‘FAINR’, … Read more

Method does not exist or incorrect signature: void beforeInsert(Call__c)

I’m trying to write test class for my Apex lass but I’m getting an error at the last line. Error: Compile Error: Method does not exist or incorrect signature: void beforeInsert(Call__c) from the type CallTriggerService at line 45 column 38 Please suggest my Test calss is correct or any mismatches exist.Please help? Apex Class : … Read more