First we have to create custom setting PaymentOpp and need to create field OppName along with values Mani .
public Calc(){
//lstw =new List<wrapper>();
oppidd = System.currentPagereference().getParameters().get('oppid');
recid= new set<string>();
String[] cd = oppidd.split(',');
RowNo = cd.size();
System.debug('RowNo--->'+RowNo );
}
String Finalval = '';
string FinalvalSub ;
for(Opportunity Each:selectedOpportunities){
oppid.add(each.id);
}
for (iD Obj:oppid){
Finalval = Finalval +','+ Obj;
}
System.debug('%%%%%%%Finalval '+Finalval );
FinalvalSub = Finalval.substringAfter(',');
//FinalvalSub = Finalval.substringBefore(',');
System.debug('%%%%%%%FinalvalSub '+FinalvalSub );
List<PaymentOppId__c> PaySetting ;
for(PaymentOppId__c PId:[Select Id,OppId__c, Name From PaymentOppId__c Where Name = 'Mani']){
PId.OppId__c = FinalvalSub ;
System.debug('FinalvalSub --->'+FinalvalSub);
System.debug('PId--->'+PId);
Update PId;
}
public Calc(){
//lstw =new List<wrapper>();
oppidd = System.currentPagereference().getParameters().get('oppid');
recid= new set<string>();
String[] cd = oppidd.split(',');
RowNo = cd.size();
System.debug('RowNo--->'+RowNo );
}
String Finalval = '';
string FinalvalSub ;
for(Opportunity Each:selectedOpportunities){
oppid.add(each.id);
}
for (iD Obj:oppid){
Finalval = Finalval +','+ Obj;
}
System.debug('%%%%%%%Finalval '+Finalval );
FinalvalSub = Finalval.substringAfter(',');
//FinalvalSub = Finalval.substringBefore(',');
System.debug('%%%%%%%FinalvalSub '+FinalvalSub );
List<PaymentOppId__c> PaySetting ;
for(PaymentOppId__c PId:[Select Id,OppId__c, Name From PaymentOppId__c Where Name = 'Mani']){
PId.OppId__c = FinalvalSub ;
System.debug('FinalvalSub --->'+FinalvalSub);
System.debug('PId--->'+PId);
Update PId;
}
if(Month>7){
System.debug('Month#####'+Month);
pg = new PageReference('/apex/RepaymentGenPage?CustName=Mani');
//PageReference pg = new PageReference('/apex/PaymentSchedule?CustName=Mani');
//PageReference pg = new PageReference('/apex/RepaymentGenReg?CustName=Mani');
// pg.getParameters().put('oppid',selectedOpportunities[0].id);
//String appid = ApexPages.currentPage().getParameters().get('Id');
pg.getParameters().put('oppid',string.valueof(oppid));
pg.setRedirect(true);
}
else if( Month<=7) {
//PageReference pg = new PageReference('/apex/RepaymentGenPage?CustName=Mani');
pg = new PageReference('/apex/RepaymentGenReg?CustName=Mani');
// pg.getParameters().put('oppid',selectedOpportunities[0].id);
//String appid = ApexPages.currentPage().getParameters().get('Id');
pg.getParameters().put('oppid',string.valueof(oppid));
pg.setRedirect(true);
}
return pg;
}
No comments:
Post a Comment