You need to sign in to do that
Don't have an account?

looping issue ,
Hello Everyone,
advance Thanks, i have issue with bellow iteration in code, could any help to fix the below code snippet
for(Ientry__c ie:Entry)
{
integer i=0;
system.debug('ingeger==>>> '+i);
ie.Incentive_Actual__c=Incentiveactual[i].id;
if( i==1) ie.Appointmenttype__c='appointment';
else
if(i==2) ie.Appointmenype__c='sale';
else
if(i==3)ie.Appointmenttype__c='status';
else
ie.Appointment_incentive_type__c='lead';
i=i+1;
}
in the above code i value is not increasing , its being always "ZERO",
can any one help me to fix the above code
advance Thanks, i have issue with bellow iteration in code, could any help to fix the below code snippet
for(Ientry__c ie:Entry)
{
integer i=0;
system.debug('ingeger==>>> '+i);
ie.Incentive_Actual__c=Incentiveactual[i].id;
if( i==1) ie.Appointmenttype__c='appointment';
else
if(i==2) ie.Appointmenype__c='sale';
else
if(i==3)ie.Appointmenttype__c='status';
else
ie.Appointment_incentive_type__c='lead';
i=i+1;
}
in the above code i value is not increasing , its being always "ZERO",
can any one help me to fix the above code
integer i=0;
for(Ientry__c ie:Entry)
{
system.debug('ingeger==>>> '+i);
ie.Incentive_Actual__c=Incentiveactual[i].id;
if( i==1) ie.Appointmenttype__c='appointment';
else
if(i==2) ie.Appointmenype__c='sale';
else
if(i==3)ie.Appointmenttype__c='status';
else
ie.Appointment_incentive_type__c='lead';
i=i+1;
}
Let us know if this will help you
Thanks
Amit Chaudhary
All Answers
integer i=0;
for(Ientry__c ie:Entry)
{
system.debug('ingeger==>>> '+i);
ie.Incentive_Actual__c=Incentiveactual[i].id;
if( i==1) ie.Appointmenttype__c='appointment';
else
if(i==2) ie.Appointmenype__c='sale';
else
if(i==3)ie.Appointmenttype__c='status';
else
ie.Appointment_incentive_type__c='lead';
i=i+1;
}
Let us know if this will help you
Thanks
Amit Chaudhary