+ Start a Discussion

Custom settings and labels adv?

Custom settings and labels adv?


Best Answer chosen by Admin (Salesforce Developers) 
Custom settings and labels give a lot of flexibility to your program. Instead of hard coding you can make your program get the value from custom settings and you can edit the custom settings through point and click and it would change the result of your program without making you edit/compile your apex code. Eg. you can store WS end point URL in every environment you can change the URL in custom settings and they would point to different sandboxes or Prod instance. Or else you have to hardcode it in the program and you have to edit it everytime you want to switch your webservice environment. You don't have to query for custom settings or labels.

this is a good blog for this.



[Do mark this answer as solution if it works for you and give a kudos.]