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

Would like to avoid hardcoding of IDs within a URL, using custom labels, without success
Hi all,
I have a code where I am using URLs and don't want to hardcode IDs in my APEX Code, so I was looking for syntax how to declare a URL with custom labels.
For example, this is the code which works in APEX:
I have a code where I am using URLs and don't want to hardcode IDs in my APEX Code, so I was looking for syntax how to declare a URL with custom labels.
For example, this is the code which works in APEX:
public PageReference GotoPreinscripcionList() { shouldRedirect = true; url = '/a05?fcf=00B3E000000TsVm'; //url.setredirect(true); return null; }And this is the last attempt to make it work with custom labels (my 100th try):
public PageReference GotoPreinscripcionList() { shouldRedirect = true; String preinscripcion_FR_Id = Label.Preinscripcion_FR_ID; String preinscripcion_listview_Id = Label.Preinscripcion_Postgrado_ListView; url = 'preinscripcion_FR_Id?fcf=preinscripcion_listview_Id'; //url.setredirect(true); return null; }Nothing happens. Even with
String preinscripcion_listview_Id = '{!$Label.Preinscripcion_Postgrado_ListView}';Does anybody know how to handle this?
Try some think like this
All Answers
Try some think like this