You need to sign in to do that
Don't have an account?
VIKASH CHAND KUMAR
static variable not able to retain value
public with sharing class A implements B {
private static Real dataParamObj=new Real();
public List<C> method1(Id courseId) {
dataParamObj.a=a;
dataParamObj.b=b;
dataParamObj.c='Course';
public void method2(Id y) {
dataParamObj.d=d;
dataParamObj.e = e;
public List<M> method3(Id courseId) {
dataParamObj.f=f;
}
public List<MN> method4(Id courseId) {
dataParamObj.g=g;
}
public List<PQ> method5(Id courseId) {
dataParamObj.h = h;
}
public XZ returnValues(){
return dataParamObj;
}
}
i have created static variable dataParamObj and all the values a,b,c,d,e,f,g,h assigned to dataParamObj shud be returned by this method returnValues() called in different class. it was working before, but not sure what happened after winter 20 release update, static variable dataParamObj is able to hold only last value assigned 'h'. please help. not sure where is problem, it was working before.
private static Real dataParamObj=new Real();
public List<C> method1(Id courseId) {
dataParamObj.a=a;
dataParamObj.b=b;
dataParamObj.c='Course';
public void method2(Id y) {
dataParamObj.d=d;
dataParamObj.e = e;
public List<M> method3(Id courseId) {
dataParamObj.f=f;
}
public List<MN> method4(Id courseId) {
dataParamObj.g=g;
}
public List<PQ> method5(Id courseId) {
dataParamObj.h = h;
}
public XZ returnValues(){
return dataParamObj;
}
}
i have created static variable dataParamObj and all the values a,b,c,d,e,f,g,h assigned to dataParamObj shud be returned by this method returnValues() called in different class. it was working before, but not sure what happened after winter 20 release update, static variable dataParamObj is able to hold only last value assigned 'h'. please help. not sure where is problem, it was working before.