Yes, you can perform SOQL query in custom settings as you perform in the salesforce object. For example- You have a custom setting name School__c which having the field RollNo__c and Name. Your query should be- SELECT Name, RollNo__c FROM School__c WHERE Name = 'XYZ';
If you find your Solution then mark this as the best answer.
ex:select id,name from customsettings__c
You can use the methods available.
Methods available with list custom settings are:
1)getAll();
2)getValues();
Methods available with Hierarchy custom settings are:
1)getOrgDefaults();
2)getInstance();
For more details visit,
https://www.sfdc-lightning.com/2018/09/custom-settings-in-salesforce.html
Greetings!
Yes, you can perform SOQL query in custom settings as you perform in the salesforce object.
For example-
You have a custom setting name School__c which having the field RollNo__c and Name.
Your query should be-
SELECT Name, RollNo__c FROM School__c WHERE Name = 'XYZ';
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi