I am new to Salesforce. i am stuck in a test coverage part.
Can anyone please suggest how to cover these relationships 'r1.REQ_A__r.V_N__r.San__c' inside a for loop?
for(Pay__c r1:[SELECT REQ_A__r.V_N__r.San__c,REQ_C__r.V_N__r.San__c FROM Pay__c where Id in: sPReqId and Cmpny__c in ('11','12','10')
and Ex_T__c in ('Adb','car')])
{
if(r1.REQ_A__r.V_N__r.San__c==null)
{
mPReq.put(r1.P_San_No__c,r1);
}
else
{
if((r1.REQ_C__r.V_N__r.San__c==null)
{
mpPReq.put(r1.REQ_A__r.V_N__r.San__c,r1);
}
}
if(r1.REQ_C__r.V_N__r.San__c==null)
{
mPReq.put(r1.P_San_No__c,r1);
}
}
Thanks
Aucun commentaire:
Enregistrer un commentaire