Is there a possibility or did anyone tried to generate an Apex helper class based off certain conditions runtime. I am thinking this just for LEARNING prospective. This will also reduce the number of components which we have to add in the quick deploy list.


Salesforce supports Tooling API however its not available to be used by Apex (Native).

But, Good news is "Andrew Fawcett" and "James Loghry" have created wrapper around this API so it can be easily used from Apex. You can find wrapper here and install directly to Salesforce.

You may find this blog post also very helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.