I have below static method where I am trying to add an Id to a set of Ids. This throws subject line error.
Can someone please let me know where i am doing wrong?
Apex Method
public Id currentRecordId {get;set;}
public static Set<Id> childrenIds {
get{
if( childrenIds == null ) childrenIds = new Set<Id> { };
return childrenIds ;
}
set;}
@RemoteAction
public static List<Account_Plan__c > contactListRemoting (String searchTerm) {
List<Account_Plan__c > AccountPlansList = new List<Account_Plan__c>();
childrenIds.add(ApexPages.CurrentPage().getparameters().get('Id')); // Error throws here.
fetchChildrenByLevelTest(childrenIds);
AccountPlansList = Database.query('....');
return AccountPlansList ;
}