Activity Forums Salesforce® Discussions want to return multiple lists and variables from a method in Salesforce Wrapper Class?

  • sushant

    January 19, 2017 at 2:10 pm

    Hi Vikas,

    Following example may help you.

    public class wrapperClass{
    Integer int;
    String str;
    Account acc;

    And use this class as a return value of your method:

    public static wrapperClass methodToReturnWrapper(){

    wrapperClass wc = new wrapperClass();
    //here you can fill in wrapper with values you want, like = 1
    return wc;


Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos