You need to sign in to do that
Don't have an account?
bheemudu neeli
Batch method does not enter into else for null value
Hi,
my code working properly but, does not entered into else block. what wrong in my code. please need help
if (mapBRTotal.get(b.Id) != null ){
for (Bond_Reinsurance__c br :mapBRTotal.get(b.Id)){
If(br.Reinsurer__r.RecordType.id=='012b00000001700AAA' && br.Reinsurer__r.Trading_Partner__c==true && br.Reinsurer__r.Reinsurer_Type__c=='Facultative Out' && !(br.Reinsurer__r.Name.startsWith('OC') || br.Reinsurer__r.Name.startsWith('QS'))){
riProportion+=br.Proportion__c;
grossOutstanding=b.ZGCS_Reduced_Bond_Amount__c-riProportion;
}
}
} else
grossOutstanding=b.ZGCS_Reduced_Bond_Amount__c;
Thanks,
Bheem
my code working properly but, does not entered into else block. what wrong in my code. please need help
if (mapBRTotal.get(b.Id) != null ){
for (Bond_Reinsurance__c br :mapBRTotal.get(b.Id)){
If(br.Reinsurer__r.RecordType.id=='012b00000001700AAA' && br.Reinsurer__r.Trading_Partner__c==true && br.Reinsurer__r.Reinsurer_Type__c=='Facultative Out' && !(br.Reinsurer__r.Name.startsWith('OC') || br.Reinsurer__r.Name.startsWith('QS'))){
riProportion+=br.Proportion__c;
grossOutstanding=b.ZGCS_Reduced_Bond_Amount__c-riProportion;
}
}
} else
grossOutstanding=b.ZGCS_Reduced_Bond_Amount__c;
Thanks,
Bheem
Store this value in to any string value and chekc the condition somthing like below code. also check the return value type of this mapBRTotal
public string Tempid=mapBRTotal.get(b.Id);
if(Tempid!=null)
{
}
else
{
}
Hope this will give you some idea.
Thanks
karthik
Else block will be executed when list Bond_Reinsurance__c will be null for b.id otherwise it will not execute the else block.
Have you checked for this criteria?
Thanks!