• Sachin Kumar
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi All,

I am new to Salesforce. I am getting below exception on my test class.
Can you please suggest me here ?

@isTest
    static void test_releaseInitiative()
    {
        init();

        Test.startTest();

        String errorRelease = ViewInitiativesController.releaseInitiative(testInitiative.Id);

        Initiative__c testInitiativeCheck = [SELECT Status__c, Initiative_Released__c FROM Initiative__c WHERE Id = :testInitiative.Id];
        System.assertEquals(true, testInitiativeCheck.Initiative_Released__c, 'Wrong Initiative_Released__c: ' + errorRelease);

        Test.stopTest();
    }

Error is -- System.AuraHandledException: Script-thrown exception

Any help is really appriacted. 
Thanks in advance.

 
Hi All,

I am new to Salesforce. I am getting below exception on my test class.
Can you please suggest me here ?

@isTest
    static void test_releaseInitiative()
    {
        init();

        Test.startTest();

        String errorRelease = ViewInitiativesController.releaseInitiative(testInitiative.Id);

        Initiative__c testInitiativeCheck = [SELECT Status__c, Initiative_Released__c FROM Initiative__c WHERE Id = :testInitiative.Id];
        System.assertEquals(true, testInitiativeCheck.Initiative_Released__c, 'Wrong Initiative_Released__c: ' + errorRelease);

        Test.stopTest();
    }

Error is -- System.AuraHandledException: Script-thrown exception

Any help is really appriacted. 
Thanks in advance.

 
During the Deployment i've gon en error
System.LimitException: Too many SOQL queries: 101 
Stack Trace: Class.TriggerHanglerActivity.copyDataToContactProductCategory: line 388, column 1 Class.TriggerHanglerActivity.onAfterUpdate: line 47, column 1 Trigger.ActivityTrigger: line 24, column 1
The Apex Class is:
global class UpdateUserTargets Implements Schedulable
    {
        global void execute(SchedulableContext sc)
        {
            doexecute();
        }

        public void doexecute()
        {
            list<PersonalGoals__c> AllRecords = new list<PersonalGoals__c>();
            AllRecords = [select Id from PersonalGoals__c where Q_check__c = TRUE];
            update AllRecords;
        }
    }

How to solve this error?