• Pavan Kumar P
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
trigger opptoacc on Opportunity (after insert,after update) {

    list<Account> acctList = new list<Account>();
    Set<Id> accId = new Set<Id>();
    
    for(Opportunity opp: Trigger.New){
        accId.add(opp.accountId);
        
    }
    
    
    for(Account acc:[SELECT Id,Name,Industry FROM Account WHERE Id IN: accId]){
        for(Opportunity op1:Trigger.New){

       if(Trigger.isInsert && op1.Name=='something'){

                acc.Rating='hot';

                acctList.add(acc);


            }
            
            
           
        }
    
    }
    
}

I need test class that covers more than 75% of code.

Thanks in Advance.

Regards,
Pavan Kumar P.
 
trigger opptoacc on Opportunity (after insert,after update) {

    list<Account> acctList = new list<Account>();
    Set<Id> accId = new Set<Id>();
    
    for(Opportunity opp: Trigger.New){
        accId.add(opp.accountId);
        
    }
    
    
    for(Account acc:[SELECT Id,Name,Industry FROM Account WHERE Id IN: accId]){
        for(Opportunity op1:Trigger.New){

       if(Trigger.isInsert && op1.Name=='something'){

                acc.Rating='hot';

                acctList.add(acc);


            }
            
            
           
        }
    
    }
    
}

I need test class that covers more than 75% of code.

Thanks in Advance.

Regards,
Pavan Kumar P.
 
Hello,

I am getting below error while trying to use force:createRecord in one of my lightning component
User-added image

Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
User-added image
Here is component 
User-added image
I'm doing the simple lightning components challenge and have hit this problem in my existing trailhead org and a brand new dev org that I've just created:

Challenge not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: QVWBQHAG