You need to sign in to do that
Don't have an account?
Jason Castle
What's wrong with my SOQL query?
I'm trying to perform a unit test on a query that doesn't debug properly in the console because its not using live data. In an effort to provide the data in the class itself, I'm still getting nothing. Do you know why my contact isn't being added to my new list?
Contact newContact1 = new Contact( LastName = 'testvalue', AccountId = '001g000000f14cB', //company = 'testervalue', Lead__c = leadToConvert.Id ); system.debug(newContact1); List<Contact> searchList = [SELECT Id,Lead__c FROM Contact WHERE Lead__c =:leadToConvert.Id];
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
All Answers
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
Before line 8, try adding:
insert newContact1;
Thanks.
Please try above code