• Shiv Kumar 45
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
In the class i am accessing the parent record attribute with __r in the select query in child query like below .
Childrecord__c child = [ select Parentobj__r.Account__c  from childobject__c where name ='Test' limit 1 ];
if(child.Parentobj__r.Account__c != null)
{
do something();
}
In test class i have created parent and child record ,
but value of Parentobj__r.Account__c  always giving  null value while debug please help here ,
 
In the class i am accessing the parent record attribute with __r in the select query in child query like below .
Childrecord__c child = [ select Parentobj__r.Account__c  from childobject__c where name ='Test' limit 1 ];
if(child.Parentobj__r.Account__c != null)
{
do something();
}
In test class i have created parent and child record ,
but value of Parentobj__r.Account__c  always giving  null value while debug please help here ,
 
In the class i am accessing the parent record attribute with __r in the select query in child query like below .
Childrecord__c child = [ select Parentobj__r.Account__c  from childobject__c where name ='Test' limit 1 ];
if(child.Parentobj__r.Account__c != null)
{
do something();
}
In test class i have created parent and child record ,
but value of Parentobj__r.Account__c  always giving  null value while debug please help here ,