I have created one Row Action in Table and calling apex function from snippet. But it is not able to call the Apex function. Weird thing is that i am not getting error after clicking row action icon.
Can somebody help to resolve it?
Class -
public with sharing class MyApexController{
public static List getUnReadAlerts(Id alertId){
// Logic
return List;
}
}
Page -
<apex:page docType=“html-5.0” readOnly=“true”
standardController=“SObject” extensions=“MyApexController”>
<skuid:page page=“skuidPage”/>
</apex:page>
Snippet -
var $ = skuid.$,
args = arguments>0],
item = args.item,
list = args.list,
model = args.model;
var currentUserModel = skuid.model.getModel( ‘NewModel’ );
var alertRecord = currentUserModel.getFirstRow();
var alertId = currentUserModel.getFieldValue( alertRecord, ‘Id’ ) ;
currentUserModel.abandonAllRows();
alert(‘Point1’);
var myUnReadAlerts = MyApexController.getUnReadAlerts(alertId);
currentUserModel.adoptRows(myUnReadAlerts);
alert(‘Point2’);
I am able to get the first alert , but not second.