0

I am building a package for custom field creation. I have noticed in some cases the following errors:

FIELD_INTEGRITY_EXCEPTION:Cannot add custom fields to entity: AIRecordInsight

and

FIELD_INTEGRITY_EXCEPTION:Cannot add custom fields to entity: AIInsightReason

Is there any way to use dynamic apex to find out the list of objects that support creation of custom fields rathen than running field creation script for every object and catching errors?

3

EntityDefinition object has an attribute IsCustomizable which tells if custom fields can be defined for the entity. Also DandBCompany should be manually excluded since it returns true but doesn't allow custom fields.

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.