What is URL Hacks ?
The technique of reverse engineering standard salesforce URL & using them to build a custom solution.Problems of using URL Hacks ?
The standard salesforce URL formats & parameters is undocumented. So, it could be changed anytime during standard release or during bug fixes. So, it's better to avoid
How to avoid it ?
Salesforce provides standard ways to access the URL & parameters in Visualforce & Apex. Developers must use them instead of hardcoding the URL's in the code.Where is the code ?
Instead of using something like '/006/o' to redirect to opportunity tab page, one could use $Action.Opportunity.Tab with the help of URLFOR function to get the URL.For illustration, i have shown how to get the URL's for create, view, edit delete for an opportunity record
Where can i find more information ?
For more information, you can see the possible action values for all sObjects,$Action - Salesforce doc
Invalid parameter for function URLFOR
ReplyDeleteError is in expression '{!URLFOR($Action.Opportunity.View, Opportunity.Id)}' in component
this error occur in this visualforce page.
what is syntax of URLFOR and how to fatch Opportunity.Id. Which record is view