How to check whether a userid exists in List Custom settings in Salesforce?

Sample Code:

if ( CustomSettingsName__c.getValues(UserInfo.getUserId()) != null ) {
    //do something since it contains the user id
}

Cheers!!!

No comments:

Post a Comment