FAQ
overflow

Great Answers to
Questions About Everything

QUESTION

I have created a Custom Settings 'Tal_Source_Map__c' which has 4 fields.

Combination of SF_Source_Type__c and SF_Source_Sub_Type__c will have a unique set of Tal_Source_Type__c and Tal_Source_Type__c.

How can I get Tal_Source_Type__c and Tal_Source_Type__c values using SF_Source_Type__c and SF_Source_Sub_Type__c?

Is it possible to use getInstance()?

{ asked by Yash Mehta }

ANSWER

You can use SOQL to query Custom Settings just like an object. Use a SQOL query to find the right value:

select Tal_Source_Type__c, Tal_Source_Type__c from Tal_Sourc_Map__c 
where SF_Source_Type__c = :someval and SF_Source_Sub_Type__c = :otherval

{ answered by Daniel Hoechst }
Tweet