I would like to create custom Formula checkbox field "UniqueId" which is true or false based on values in my Custom Settings.

I have got Hierarchical Settings based on Profiles with one custom field which stores Record Type Ids for Cases.

For example: CUSTOM SETTING: Profile - System Administrator "RecordIdField" - Id1,Id2,Id3

Profile - Standard User "RecordIdField" - Id1,Id3,Id5

And field for System Admin will take true for Cases with RecordTypeId 1,2 or 3 for rest false, for Standard User will take true for Cases with RecordTypeId 1,3 or 5 and rest false.

Is there any way to get this?

2 Answers 2


If it a hierarchy custom setting then you can access the custom setting using


Now you can use formula's CONTAINSto check recordType Id is present all or not. Based on that return true or false

  • $setup.CUSTOMSETTINGNAME.FIELDAPINAME is there any chance that it will be based on user profile?
    – Jacob K
    Jul 18, 2017 at 12:19
  • @JakubKołodziej you don't to do anything for profile. Salesforce will return the value which is current user's profile or user mentioned in hierarchy custom setting
    – Ratan Paul
    Jul 18, 2017 at 12:35
  • So i just tried CONTAINS($Setup.CaseTypeX__c.Ids__c, RecordTypeId) but it is not working. I made second formula to take text with $Setup.CaseTypeX__c.Ids__c and it is blank.
    – Jacob K
    Jul 18, 2017 at 13:09
  • @JakubKołodziej have you created record in custom setting for current user's profile and also check the recordTypeid in 18 char or 15 char
    – Ratan Paul
    Jul 18, 2017 at 13:17
  • 1
    Ok just made custom settings for System Administrator instead of System Administrator F2A. Everything working well. Thanks Ratan Paul.
    – Jacob K
    Jul 18, 2017 at 13:24

Formula checkbox field on the object cannot be created in this case as the Formula editor cannot access the Custom Settings which you have.

You need to handle the conditions in the Apex class.

Refer Custom Settings in Apex

You must log in to answer this question.

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