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

error in in expression "{onload}' in component <apex page> ?
am getting error in the below highlighted line in bold it says error is in expression '{onload}' in component <apexpage>
private static RampData cloneFutureDatedAmendmentGroups(String quoteId, String subQuoteId, RampData data, Map<String, String> oldQrpcToNewQrpcMap) {
System.debug(LoggingLevel.INFO, 'Cloning FDAG...');
//fdag
List<FutureDatedAmendmentGroup__c> fdagList = Database.query(getCreatableFieldsSOQL('FutureDatedAmendmentGroup__c', 'Quote__c =\'' + quoteId + '\''));// here error
List<FutureDatedAmendmentGroup__c> fdagToCreate = new List<FutureDatedAmendmentGroup__c>();
List<String> oldFdagIdList = new List<String>();
for (FutureDatedAmendmentGroup__c fdag : fdagList) {
FutureDatedAmendmentGroup__c newFdag = fdag.clone(false, true, false, false);
newFdag.Quote__c = subQuoteId;
newFdag.QuoteRatePlanCharge__c = oldQrpcToNewQrpcMap.get(newFdag.QuoteRatePlanCharge__c);
fdagToCreate.add(newFdag);
oldFdagIdList.add(fdag.Id);
}
if (!oldFdagIdList.isEmpty()) {
insert fdagToCreate;
System.debug(LoggingLevel.INFO, 'Created FDAG: ' + fdagToCreate);
}
//map the old id to the new id so the fda knows where to go
Map<String, String> oldFdagIdToNewFdagId = new Map<String, String>();
for (integer i = 0; i < oldFdagIdList.size(); i++) {
// 3/30/17 MD
// fdagToCreate was fdagList which is the old, so its mapping old to old...
oldFdagIdToNewFdagId.put(oldFdagIdList[i], String.valueOf(fdagToCreate[i].id));
}
data.oldFdagIdToNewFdagId = oldFdagIdToNewFdagId;
System.Debug(LoggingLevel.INFO, 'data: ' + data);
return data;
}
private static RampData cloneFutureDatedAmendmentGroups(String quoteId, String subQuoteId, RampData data, Map<String, String> oldQrpcToNewQrpcMap) {
System.debug(LoggingLevel.INFO, 'Cloning FDAG...');
//fdag
List<FutureDatedAmendmentGroup__c> fdagList = Database.query(getCreatableFieldsSOQL('FutureDatedAmendmentGroup__c', 'Quote__c =\'' + quoteId + '\''));// here error
List<FutureDatedAmendmentGroup__c> fdagToCreate = new List<FutureDatedAmendmentGroup__c>();
List<String> oldFdagIdList = new List<String>();
for (FutureDatedAmendmentGroup__c fdag : fdagList) {
FutureDatedAmendmentGroup__c newFdag = fdag.clone(false, true, false, false);
newFdag.Quote__c = subQuoteId;
newFdag.QuoteRatePlanCharge__c = oldQrpcToNewQrpcMap.get(newFdag.QuoteRatePlanCharge__c);
fdagToCreate.add(newFdag);
oldFdagIdList.add(fdag.Id);
}
if (!oldFdagIdList.isEmpty()) {
insert fdagToCreate;
System.debug(LoggingLevel.INFO, 'Created FDAG: ' + fdagToCreate);
}
//map the old id to the new id so the fda knows where to go
Map<String, String> oldFdagIdToNewFdagId = new Map<String, String>();
for (integer i = 0; i < oldFdagIdList.size(); i++) {
// 3/30/17 MD
// fdagToCreate was fdagList which is the old, so its mapping old to old...
oldFdagIdToNewFdagId.put(oldFdagIdList[i], String.valueOf(fdagToCreate[i].id));
}
data.oldFdagIdToNewFdagId = oldFdagIdToNewFdagId;
System.Debug(LoggingLevel.INFO, 'data: ' + data);
return data;
}
Can you ensure the quoteId is not having a null value? Thanks
in the above the quote field is lookup field in futureamendentgroup object