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
SF OperatorSF Operator 

Custom link in Visualforce

I want to use custom links that I already created on my custom visualforce page and I dont know how.

I also have a home component with Link as type. 

How can I use custom links or home link component on my custom visualforce page?

AnudeepAnudeep (Salesforce Developers) 
$Action global variable provides access to the button/link objects. You need to use the URLFOR to use it in your visualforce page. Then you can either put it into the action param of a command button or use it as you'd like anywhere else in your markup.
 
<apex:commandButton action="{!URLFOR($Action.My_Obj__c.My_custom_link)}" value="My custom button"/>
or
 
<a href="{!URLFOR($Action.Calculation__c.My_custom_link)}">My link</a>

Please mark this answer as Best if you find this information helpful

Anudeep
SF OperatorSF Operator

Thanks for your reply, sadly, It's not working for me: Field $Action.Home.TaxId_arg does not exist. Check spelling.