# Creating Page Links

With page links, Admins can create links that navigate users to custom destinations. Page links allow you to send users to a custom URL or a <a href="/en/lr/812236/">Custom Page</a> when performing actions that would normally take them to the standard object details page. For example, an Admin may want to create a custom user interface for simplifying data entry into a Vault object for tracking _Events_.

When you configure a page link on an object record action such as _View_, Vault navigates users to the custom URL instead of the standard object details page. When users exit the page, Vault navigates back to the standard UI.

You can create page links for the following object record actions:

  * Create
  * View
  * Edit
  * Copy

All page links must be either a web link (URL), which opens as a standard object details page would, or a URL to a <a href="/en/lr/812236/">Custom Page</a> in the current Vault. URLs can use [tokens for object fields][1] and additional details like _Object Name_ and _Record ID_. When your users perform an action configured with a page link, Vault replaces the tokens with the specific object's field value.

## How to Create Page Links

An object can have one page link for each **Page Mode**. For example, the _Applications_ object could have one page link for each of the following actions: **Create**, **View**, **Edit**, and **Copy**.

  1. Navigate to **Admin > Configuration** > **Page Links**.
  2. Click **Create**.
  3. Enter a **Label** for the page link, for example, My Page Link. Vault auto-populates the **Name** field, for example, `my_page_link__c`.
  4. Optional: Enter a **Description**. This appears in the _Page Links_ list view.
  5. Select the **Page Mode**. This determines which action redirects the user to the custom URL.
  6. Select the **Object** to which the page link will apply.
  7. Select a **Link Type** of _Web_ or _Page_. _Web_ is the default page link type.
  8. Conditional: For a _Link Type_ of _Web_, provide the source URL starting with “https://”. To use the domain of the currently authenticated Vault, add the `{{Vault.domain}}` token.
  9. Conditional: For a _Link Type_ of _Page_, select a `Page` component in the current Vault. The page link will navigate to the specified <a href="/en/lr/812236/">Custom Page</a>. Learn more about developing Custom Pages in the <a class="external-link " href="https://developer.veevavault.com/custompages" target="_blank" rel="noopener">Developer Portal<i class="fa fa-external-link" aria-hidden="true"></i></a>.
  10. Select one or more [available fields][1] from the **Fields** panel and double-click to move them to the **URL** panel.
  11. Click **Validate**. Vault displays an error if your URL is invalid.
 1.  Click **Save**.

### URL Tokens {#tokens}

For the _Web_ link type, Vault provides placeholder URL text with basic supported <a href="/en/lr/6382/">tokens</a> in the **URL** field. 

For the _Page_ link type, Vault pre-populates the URL to the <a href="/en/lr/812236/">Custom Page</a> in the current Vault. You cannot update the base path. You can use the supported tokens to add path parameters to the Custom Page path. Learn more about creating page links to Custom Pages in the <a class="external-link " href="https://developer.veevavault.com/custompages/#Creating_Page_Links" target="_blank" rel="noopener">Developer Portal<i class="fa fa-external-link" aria-hidden="true"></i></a>.

Vault only supports page links for HTTPS pages. You can add the following tokens to your page link URL:

  * Object Name `{{Metadata.name}}`
  * Record ID `{{Object.id}}`
  * User Name `{{User.name__v}}`
  * User Email `{{User.email__v}}`
  * User ID `{{User.id}}`
  * Vault Domain `{{Vault.domain}}`
  * Vault ID `{{Vault.id}}`
  * Field Parameters `{{Related.fieldParameters}}`

### External URLs

Vault supports page links to external URLs with iFrames. Admins can configure the iFrame address when creating the page link. Users with correct object permissions can click an external URL page link to open the URL in an iFrame in the standard Vault window.

### Custom & Standard Page Links

Page links that Admins create are custom page links and have the `__c` custom <a href="/en/lr/22904/#namespace">namespace suffix</a>. Vault also supports standard page links, which have the `__v` standard namespace suffix. Admins cannot delete standard page links, but they can edit the _Label_ and _Description_ fields.

## How to Edit Page Links

  1. From the _Page Link_ list view, click on the page link's **Actions** menu.
  2. Click **Edit**.
  3. Make any necessary changes and click **Save**.

## How to Delete Page Links

  1. From the _Page Link_ list view, click on the page link's **Actions** menu.
  2. Click **Delete**.
  3. Click **Continue** in the confirmation dialog to permanently delete the page link.

Deleting a page link removes it from your Vault. This action can't be undone.

## Limits for URL Length

Web browsers have various limitations on the maximum number of characters in a URL. Several browsers limit URLs to 2,083 characters. We recommend keeping the URL length under that limit. Keep in mind that the tokens you include in the URL may render into longer values.

## Related Permissions

Admins must have a security profile with the **Page Links** permission. A user’s _Object_ permissions determine whether they can access object record actions configured with a page link. 

 [1]: #tokens
