You need to sign in to do that
Don't have an account?
SFDCAdmin73
Method does not exist or incorrect signature?
I am not strong in writing Apex Classes and Trigger and need assitance.
I am receiving the following error: Method does not exist or incorrect signature: populateRollUpFieldsOnOpportunity(newRecordsMap);
Here is the section of code for your reference. The error is on line 25.
I am receiving the following error: Method does not exist or incorrect signature: populateRollUpFieldsOnOpportunity(newRecordsMap);
Here is the section of code for your reference. The error is on line 25.
public with sharing class MultipleShipmentTrackingTriggerHandler { public static set<Id> opptyIds = new set<Id>(); public static boolean oliUpdateRunning = false; public static boolean doNotUpdateQuantity = false; public static boolean doNotUpdateAmount = false; public static void beforeInsertHandler(List<Multiple_Shipment_Tracking__c> newRecords){ // validate the product , it must be from oppotunity line items validateProduct(newRecords); // populate fields on multiple shipment tracking record based on the valid product selected prePopulateFields(newRecords, false, null); } public static void beforeUpdateHandler(Map<Id,Multiple_Shipment_Tracking__c> oldRecordsMap, Map<Id,Multiple_Shipment_Tracking__c> newRecordsMap){ // validate the product , it must be from oppotunity line items validateProduct(newRecordsMap.values()); // populate fields on multiple shipment tracking record based on the valid product selected prePopulateFields(newRecordsMap.values(), false, oldRecordsMap); } public static void afterInsertHandler(Map<Id,Multiple_Shipment_Tracking__c> newRecordsMap){ // populate roll up calculation fields on opportunity populateRollUpFieldsOnOpportunity(newRecordsMap); } public static void afterUpdateHandler(Map<Id,Multiple_Shipment_Tracking__c> oldRecordsMap, Map<Id,Multiple_Shipment_Tracking__c> newRecordsMap){ // populate roll up calculation fields on opportunity populateRollUpFieldsOnOpportunity(newRecordsMap);
Line number 209 you have
public static void populateRollUpFieldsOnOpportunity(Map<Id,On_Going_Revenue_by_Fiscal_Quarter__c> newRecords){
and at Line number 25, 30, 38 you have
populateRollUpFieldsOnOpportunity(newRecordsMap);
Here newRecordsMap is a Map<Id,Multiple_Shipment_Tracking__c> newRecordsMap
Method is expecting Map<Id,On_Going_Revenue_by_Fiscal_Quarter__c> and we are passing Map<Id,Multiple_Shipment_Tracking__c>
One morething here is anyway at line number 209, you are not using the parameter whichever you are sending hence we can remove that parameter:
Below is the modified code:
Please do let me know if it helps you.
Regards,
Mahesh
All Answers
Please paste the full class so that it will be easy to answer your issue.
As this moment:
Method doesn't exists in you.
Regards,
Mahesh
Line number 209 you have
public static void populateRollUpFieldsOnOpportunity(Map<Id,On_Going_Revenue_by_Fiscal_Quarter__c> newRecords){
and at Line number 25, 30, 38 you have
populateRollUpFieldsOnOpportunity(newRecordsMap);
Here newRecordsMap is a Map<Id,Multiple_Shipment_Tracking__c> newRecordsMap
Method is expecting Map<Id,On_Going_Revenue_by_Fiscal_Quarter__c> and we are passing Map<Id,Multiple_Shipment_Tracking__c>
One morething here is anyway at line number 209, you are not using the parameter whichever you are sending hence we can remove that parameter:
Below is the modified code:
Please do let me know if it helps you.
Regards,
Mahesh
If a method is expecting a map of Id, SomeObject, you need to pass it the same map, otherwise the compiler will throw an error that the method does not exist.