Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public with sharing class MyControllerThing{
@RemoteAction
public static MyWrapperThing getWrapper(){
MyWrapperThing result = new MyWrapperThing();
result.isSomething = true;
result.name = 'my wrapper obj';
result.version = 7;
return result;
}
@RemoteAction
public static String getWrapperJSON(){
MyWrapperThing result = new MyWrapperThing();
result.isSomething = true;
result.name = 'my wrapper obj';
result.version = 7;
return JSON.serialize(result);
}
}
public class MyWrapperThing{
public boolean isSomething;
public String name;
public Integer version;
public String Id{
get{
return name+'.'+version;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment