function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SanjivaniSanjivani 

Lookup or Custom Labels

Hi, I have a situation where I need to check for multiple stages. My opportunity page behaves as per the stage opportunity has, so there will be multiple conditions in VF as well as in controllers. Right now, stages are hardcoded and it is very troublesome to make further stage related changes. 
What would be best way to replace these hardcoded stages names? Custom lables or Lookups?

Thanks & Regards
Sanjivani

All Answers

Mudasir WaniMudasir Wani
Hi Sanjivani,

It depends if your value is dependent on stage only then lookup is the best option.
You can have a look on the List custom settings.

I donot understand how custom label will make it more easy.
In that case you may need to add a new label so I will not recommend the custom label concept.

Thanks,
Mudasir
SanjivaniSanjivani
Hi Mudasir,

Thanks for the reply. I will have fixed stages names, but there may be renaming in stages or very rare addon to the stages.
If I user look up, there will be hardcoding of ids to check stages, which wont be coder friendly, that is only the concern. And I will need SOQL to populate stages too.
If I use custom labels, i can compare and use stages name without soql, and can use friendly name in VF pages.

 
SanjivaniSanjivani
Thanks Musasir, List Custom Settings will be best choice for me :)

Another great blog about list custom settings:
http://blog.jeffdouglas.com/2010/01/07/using-list-custom-settings-in-salesforce-com/