+ Start a Discussion

Can someone help me understand Apex Describe? Looping through a number of picklists on an object...



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!

Andy BoettcherAndy Boettcher

You are indeed doing down the right path with getDescribe...check out this post:






I'm reading through it, thank you very much!