When i am trying to send parameter from Visul force remoting to apex method, it is saying that Unknown Method but method was exists in controller . Can anyone please help me how to fix this issue.
VF Page:
<script>
function GetCheckboxes(){
var checkedBoxes = [];// It will holds the set of selected Id's
checkedBoxes.push(getCheckedBoxes("mycheckboxes"));
console.log('CheckboxId'+checkedBoxes);
//CallMeth();
Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.AccountTeamHandler.CallMeth}',
checkedBoxes,
function(result, event){
if (event.status) {
console.log('I am here remote');
} else if (event.type === 'exception') {
} else {
}
},
{escape: true}
);
}
Class:
global without sharing class AccountTeamHandler {
global List<Id> Id {set;get;}
@RemoteAction
global static void CallMeth(List<Id> Id){
List<AccountTeamMember> Teammem=[select id,User.Name, User.Id from AccountTeamMember];
// delete Teammem;
system.debug('I am here'+Id);
// return 'Ok';
}
Error: Unknown method 'AccountTeamHandler.CallMeth()'
console.log('CheckboxId'+checkedBoxes);
print?string
variable or is it giving problem only forarray
type?