You need to sign in to do that
Don't have an account?
Karthi_Velu
Get the Web Tab url in apex controller without hardcode?
Folks,
From my apex class i want to get the 'Web Tab' URL using its name. I want to avoid the hardcoding the url my code following.
private final String RedirectUrl = '/servlet/servlet.Integration?lid=01r70000000EWxQ&ic=1'; public PageReference cancelView(){ PageReference newPage = new PageReference(RedirectUrl); newPage.setRedirect(true); return newPage; }
Can you simply use the frontdoor urls for each object? Would that work?
Jeff Douglas
Informa Plc
http://blog.jeffdouglas.com
Thanks for your responce.
I couldn't understand, You mean hardcode the web tab url right. But when i will take the package that time It won't work in new installed login right(due to id may change in RedirectUrl = '/servlet/servlet.Integration?lid=01r70000000EWxQ&ic=1').
This is my problem. So that only iam searching for generic solution to redircect the another web tab url from apex.
Sorry... I thought you were talking about a custom object tab. I'm not sure that you have any alternative but to hardcode the address. It shouldn't be an issue as the id of the tab remains the same when you refresh sandboxes from production. Or are you talking about some sort of managed package?
Thanks
Jeff Douglas
Informa Plc
http://blog.jeffdouglas.com