You need to sign in to do that
Don't have an account?

how to use custom Settings in Triggers
I was stored a list of numbers in customSettings__c
i have a "Enter_Number__c " field on Object__c.
Then if a user enter any value already existed in the customSettings__c, it will throw an error.
How can we do that.
1.Using Trigger
2.Using Validations. please help me out.
i have a "Enter_Number__c " field on Object__c.
Then if a user enter any value already existed in the customSettings__c, it will throw an error.
How can we do that.
1.Using Trigger
2.Using Validations. please help me out.
You can use custom settings in Apex triggers - the fact that you are in a trigger doesn't make any difference, you can use the mechanism for accessing via Apex:
The docs have details of this and some sample code:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm
Please mark it as best answer if the information is informative.
Best Regards
Rahul Kumar