• Shyam Swami
  • 30 Points
  • Member since 2019

  • Chatter
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 4

Everyone How to insert a record in custom object which is under in Contact Standard Object Lookup RelationShip Between them

Attendance__c lookup (Contact)

Thanks and Regards 
neeraj Sharma
Hi Team,

I have an Apex code which used below SOQL,
ID cUID=  UserInfo.getUserId() ;

        User cU= [Select id, Name, ContactId from User where id = :cUID limit 1];

        Contact cC= [Select id, Name, AccountId, Account.name from Contact where id = :cU.ContactId limit 1];

        ID accountId = cC.AccountId;
The ContactId will have a value only for users who are enabled for Partner or Customer Portal accounts.

How do I create a Test Class and test it?
Also, it has lightning components, how do I test it?

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