You need to sign in to do that
Don't have an account?

Can someone help me understand Apex Describe? Looping through a number of picklists on an object...
Hello,
I've read through the docs and I've seen it used in code but I still don't fully comprehend when to use it. I have an object with 34 pick lists on it, I want to loop through those, without having to write 34 if statements. They are numbered like so, "q1__c", "q2__c", etc. Could I use sObject.describe to get a count of these and then loop through them?
Thank you in advanced!
You are indeed doing down the right path with getDescribe...check out this post:
http://boards.developerforce.com/t5/Apex-Code-Development/Picklist-values-from-getDescribe-dynamically/m-p/144439#M19473
-Andy
I'm reading through it, thank you very much!