You need to sign in to do that
Don't have an account?
Anil Kamisetty
Schema Question - Which sObjects support Triggers / Field Sets
Apex support Schema Call to get properties on the Salesforce objects. How can I tell if an Object Supports a Trigger or not ? Similarly, how can I say if it can have a Field Set created ? Is there any method which tell me this information.
If not using Schema, if there is another way to get this information, please share that too.
Note : If I know the Object name, I can use SCHEMA calls to get the Object and field set information (if it exists, not that it can support). Here the need is to know which objects supports Field Set / Trigger creation. If you can notice the SCHEMA.SObjectType results, many new objects will be noticed not just Salesforce objects (probably they are required for system).
If not using Schema, if there is another way to get this information, please share that too.
Note : If I know the Object name, I can use SCHEMA calls to get the Object and field set information (if it exists, not that it can support). Here the need is to know which objects supports Field Set / Trigger creation. If you can notice the SCHEMA.SObjectType results, many new objects will be noticed not just Salesforce objects (probably they are required for system).
All Answers
[1] https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_list.htm
[2] https://developer.salesforce.com/blogs/developer-relations/2015/02/using-metadata-api-describe-objects.html
[3] http://workbench.developerforce.com
Thanks for the reply. Seems like Field Sets need additional research. For the other part (Triggerable), are you saying we can use META DATA API. Workbench shows that for sure, but need an automated way to check in the APEX code.
Do u have any examples for the meta deta API to use in APEX ?
You will need to add your Salesforce instance to your remote site settings.
Do u have suggest any workarounds ? As of now, the workaround which I have is to process 100 http reuqests in one operation and resume it after sometime.
Your code provide a mechanism to obtain the list of objects which are triggerable in APEX. Will find another place to get the list of Fields Sets.