You need to sign in to do that
Don't have an account?
Etienne Gaudry 5
Wrapper Access
Hi all,
I have a wrapper like this :
How can I access my sessions in my apex methods?
I tried :
But it doesn't work.
I only manage to access the competitions like this :
Thanks for your help :)
I have a wrapper like this :
public class EU_API_DT_Wrap { ... public List<Competitions> Competitions; public class Competitions { ... public List<Sessions> Sessions; } public class Sessions { public String DateSession; ... } }
How can I access my sessions in my apex methods?
I tried :
EU_API_DT_Wrap myWrap = getSessionsList(saisonId, sportId); for (EU_API_DT_Wrap.Competitions.Sessions ss : myWrap.Competitions.Sessions){ ...}
But it doesn't work.
I only manage to access the competitions like this :
EU_API_DT_Wrap myWrap = getSessionsList(saisonId, sportId); for (EU_API_DT_Wrap.Competitions comp : myWrap.Competitions){ ...}
Thanks for your help :)
Greetings!
Please go through the below document for the sample code which might be helpful:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_cache_Session.htm
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri