I created custom lookup with all possible Record Types to choose by user. I simply retreive List with Record Type Infos from Schema globalDescribe and pass it from apex controller to aura component. List contains also unwanted Master record type that is visible to user. Setting Default Record Type at profile level of user does not work as expected in that situation.

I wonder how to get rid of this without manual removing Master Record Type from List?

1 Answer 1


Seems like there is no better option for filter out Master record type instead of check if record type isMaster(). Worth to mention is that I need also to check for active record types.

Simple solution will be:

    private static Boolean isRecordTypeAvailable(RecordTypeInfo info) {
        return info.isMaster() && !info.isDefaultRecordTypeMapping() ? false : info.isAvailable();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .