I've been looking around for awhile now trying to figure out how to fix this and I am unable to locate what could be wrong with this.
I am trying to create 2 objects, one that holds my Sampling Object and one that holds my Product Object. When I build my Sampling Object I want to get all the information where Responsible_for_EVB_Build1 is null so it can be populated from my Product object where it is usually not null. Am I going about this right or is my logic wrong?
List<Sampling__c> sampObj =([SELECT Product__c, Name,Id,Responsible_for_EVB_Build1__c FROM Sampling__c WHERE Responsible_for_EVB_Build1__c = null ]);
system.debug('Product Object === ' +sampObj);
List < Product2 > prodObj = new List<Product2>([Select Name,AE2__c From Product2 WHERE Id = : sampObj.Product__c]);
system.debug('1stParentsampObj === ' +prodObj);