• Bhupathi Yadav
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 3
    Replies
I am using few custom labels in in my class i have to cover code coverage for that

            /* fetch required properties from custom labels*/\

            Storefront=System.Label.RLWS_CL_EmbTrack_Storefront;
            LOGO=System.Label.RLWS_CF_Logo;
            UniversalLogo=System.Label.RLWS_CF_Universal_Logo;
            UniversalLogoPrice=System.Label.RLWS_CF_Universal_Logo_Price;
            
            currencies = [Select label from RLWS_Obj_Currency__mdt Limit 100];

Can you please tel how to cover this area
 
My scnario was when iam inserting account record automatically associated contact also should  insert:
But iam getting error like ;Variable does not exist: name' but i have field Name on account
trigger account_trigger on Account (after insert,after update)
{
  if(Trigger.isInsert)
  {

    List<Contact> ct = new List <Contact>();

    for(Account acc : trigger.new)
    {

        Contact c = new Contact(LastName=acc.name,AccountId=acc.id,MailingStreet=acc.BillingStree,
                    Phone=acc.Phone);

        ct.add(c);
    }
    insert ct;
  }
}