Hi Dnyaneshwar, One way is to create wrapper class, for example:
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 wc.int = 1
return wc;
}
Hi Dnyaneshwar, One way is to create wrapper class, for example:
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 wc.int = 1
return wc;
}
Credit for the answer above from Nubeselite actually goes to Marek Kosar_ in this thread from 2016 that they copy-pasted his answer from and gave no credit back to: https://developer.salesforce.com/forums/?id=906F0000000MLuwIAG
One way is to create wrapper class, for example: And use this class as a return value of your method:
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please mark this as solution if your problem resolved.
All Answers
One way is to create wrapper class, for example: And use this class as a return value of your method:
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please mark this as solution if your problem resolved.