Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          LINKTO

          LINKTO

          Returns a relative URL in the form of a link (href and anchor tags) for a custom s-control or Salesforce page.

          Use

          {!LINKTO(label, target,​ id, [inputs], [no override]}​ and replace label with the text for the link, target with the URL, and id with a reference to the record. Inputs are optional and can include any additional parameters you want to add to the link. The no override argument is also optional and defaults to “false.” It applies to targets for standard Salesforce pages such as $Action.Account.New. Replace no override with “true” when you want to display a standard Salesforce page regardless of whether you have defined an override for it elsewhere.

          Tips

          • Avoid using this function in an inline s-control if you want it to open in a new window.
          • Enclose multiple inputs in brackets to indicate they are together:
            {!LINKTO("View Case", $Action.Case.View, Case.Id, [parm1="A", parm2="B"])}
          • Set inputs to null if you do not have any to pass yet you want to set the no override argument:
            {!LINKTO("View Case", $Action.Case.View, Case.Id, null, true)}
          • When you override the tab home page for a standard or custom tab, use the tab’s $Action global variable as the target value, and the tab’s object type for the id value. For example, LINKTO("Accounts Tab", $Action.Account.Tab, $ObjectType.Account)
          • This function is only available in custom buttons, links, and s-controls.
          New Account S-Control Example
          New Account S-Control Example
          <html>
              <body>
                  {!LINKTO(
                      "Create a New Account", 
                      $Action.Account.New, 
                      $ObjectType.Account
                   )}
              </body>
          </html>

          This example allows users to click a link to create an account. It is useful in account list views or Web tabs where you want users to create an account directly from that page. Use the $Action global variable to access the new account page in Salesforce.

          Email Window S-Control Example
          Email Window S-Control Example
          <html>
          <body>
          {!LINKTO("Email link", ​
            "mailto:support@yourcompany.com?​​subject=Please%20Help")};
          </body>
          </html>

          This example launches a new email window addressed to support@yourcompany.com with the subject “Please Help” whenever a user clicks “Mail link.”

          Link to Another S-Control Example
          Link to Another S-Control Example
          <html>
          <body>
          {!LINKTO("Check for duplicates",​ 
            $Scontrol.dedup_account, Account.Id)}
          </body>
          </html>

          Use this example to generate a page containing a hyperlink labeled “Check for duplicates.” When users click this link, Salesforce runs your custom s-control. This example assumes you have already created a custom s-control to find duplicate accounts and merge their information.

           
          Loading
          Salesforce Help | Article