Skip to content

Instantly share code, notes, and snippets.

@mtetlow
Created March 27, 2014 20:27
Show Gist options
  • Save mtetlow/9817812 to your computer and use it in GitHub Desktop.
Save mtetlow/9817812 to your computer and use it in GitHub Desktop.
@RemoteAction
global static Boolean addUserToSession(Id userId, Id sessionId){
if(space=='avail'){ return true; }
else{ return false;}
}
From javascript:
var userId = '{!JSENCODE($UserInfo.Id)}';
var sessionId = '{!JSENCODE(controllerHasSessionId)}';
myControllerName.addUserToSession(userId, sessionId,function(result){
if(result == true){
popGoodModal();
}else{
popBadModal();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment