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

Build URL For custom list button Urgent
Hi pls help
i ve custom button like 'crete task' on lead, account, contact and opportunity detail page..
in button url, i need to pass all 4 above with respectively click on detail page.
if it is lead page(id Start with '00Q') pass lead id
if it is opportunity page(id Start with '006') pass opportunity id
etc...,
For this i need url with if conditions..
Thanks in advance
i ve custom button like 'crete task' on lead, account, contact and opportunity detail page..
in button url, i need to pass all 4 above with respectively click on detail page.
if it is lead page(id Start with '00Q') pass lead id
if it is opportunity page(id Start with '006') pass opportunity id
etc...,
For this i need url with if conditions..
Thanks in advance
Suppose if you have custom button as following on lead
<apex:commandButton action="your action goes here">
<apex:param value="{!$currentPage.parameters.id}" assignTo="{!variableInController}"/>
</apex:commandButton>
In controller you can use public Id variableInController{get;set;}
So, you can have respective id's in controller.
Use the same command button for all the detail pages.
Let me know if you have any queries, if not mark this answer as best answer.
Regards
Sampath Kumar Goud
Mark this as best answer if this solves your quer, to make this community clean and re-usable.
Regards
Sampath Kumar Goud