Monthly Archives: January 2014

Apex Tip: check if field exists on SObject

This small function check if any SObject contains a field, really useful on many cases.

For instance if you want to know if country Picklist is active, you could check countryCode field active.

Other approach using JSON serializer

Sample use:

About Martin Borthiry

I’m a fully trained and qualified software engineer with more than 15 years of varied experience, specialized in frontend performance, web developing , cloud computing, salesforce, as well as CRM functionalties and Social Networks. Specialties: Salesforce.com Platform & Web Performance Optimization. Salesforce.com Developer and Administrator Certified. Senior Frontend, Javascript and HTML5. Heavy Ajax WebApps Mobile WebApps – Phonegap Webapps Developer (Php/Django/Python) Team Work & Managment