ABSYZ ABSYZ

  • Home

    Home

  • About us

    Who We Are

  • Our Expertise

    What we Do

  • Our Approach

    How We Do It

  • Products

    What We Made

  • Industries

    Who We Do It For

  • Clients

    Whom We Did It For.

  • Article & Blogs

    What Experts Think

  • Careers

    Join The Team

  • Get In Touch

    Let’s Get Started

ABSYZ

Custom detail page button for Visualforce pages not opening in a new window – Workaround Available

Home / Article & Blogs / Salesforce / Admin / Custom detail page button for Visualforce pages not opening in a new window – Workaround Available
By Pilla Jashuva inAdmin, Salesforce

Using custom buttons, we can  redirect users to a new page, external website, download etc with just a click of a button. Every Object in Salesforce has some standard buttons predefined and also has an option to create custom buttons as well.

How to create Custom Buttons/Links

Go to Object Manager ➜ Select Object ➜ Go to Buttons, Links, and Actions ➜ Click on New Button or Link.

Once you reach this page, if you look at the ‘Content Source’ field, it has four options.

  1. URL
  2. Custom S-Control
  3. Onclick JavaScript
  4. Visualforce Page

We can use any of these as our source to create the button. Basically, using these options, we can define what should happen on click of that button.

Also, if we look at the Behavior field, 

It has various options which will define in what way, the contents of that button will be visible.

PROBLEM: “Display in new window”

As per the name, it suggests that the button will open the contents in a new window (or a new tab based on the user’s configuration of their browser). But in reality, it is not working.

As per the Salesforce Known Issues, this issue has been registered long back but there is no fix yet.

Reason: When Lightning was introduced in Salesforce during 2015-2018, Not everything from classic was converted into lightning. Few things were left out. This feature is also one of those which was never converted to lightning. Although the option is available, it will only work when using the button in classic mode and not in lightning mode.  

So, Let’s go through some Workarounds to achieve this in lightning.

Workaround- 

1) On Internal Detail Pages:  As this option is not working, One alternative is, we can create a quick action for our Visualforce Page and can add that action to our required page layout.
But this will again create another problem if this is on Case or Work Order Objects.

In these two, above-mentioned objects, whenever any action is added to the page layout, and if Chatter feed is also present on the same page, then all the quick actions will be added to chatter block beside the chatter feed. 

To overcome this, we should not add this quick action from page layout. Instead, go to that page and edit it. (For editing the page, click on Gear Icon, beside the notification icon on top right side of your Salesforce window. Then click on Edit Page).

Once, App builder is opened, Double click on the Highlights Panel (Where Case name and other quick actions are visible- also marked as 1 in the above screenshot). Then, at the right side of the builder, we will see more options related to that highlighted Panel (marked as 2 in the screenshot). There, we can find actions listed there. At the bottom of them, there will be an option to add new action. Using this button, we can add our newly created quick action. This will open as a modal on your detail page, instead of taking over your whole page.

If you still want to open it in a new window, then create a lightning Component and on component load, just execute a method and in that method, specify your main component to be loaded in a new window using Window.open(**URL**,_blank);

2) On Community Pages: Lets say, On a community portal we have something similar to Record detail page which contains Record Banner (Which basically is a standard element and will display everything just like the Highlights Panel on App Builder). But the problem on community pages is, we cannot edit it like we did for the record detail page. So, adding quick action to our Visualforce page is impossible.

We must use a different workaround. On our community page, we must create a new page and add our Visualforce page directly over there. Then, create a custom detail page button from the object manager. But instead of selecting the Visualforce page as the source of this button, we must select the URL and pass the URL of the community page we just created. Just like I did it in the below screenshot.

Here, caseaddressvault is my page name on the community and I am passing Case Id for my data retrieval on my Visualforce page.

So On click of this custom detail page button, it will open the page in a new tab/window where we have inserted our Visualforce page.

get in touch
Visualforce Page
64
Like this post
1 Post
Pilla Jashuva

Search Posts

Archives

Categories

Recent posts

All About The OmniStudio FlexCards

All About The OmniStudio FlexCards

Boost Customer Experience With Repeater Widget in CRM Analytics

Boost Customer Experience With Repeater Widget in CRM Analytics

Enhance Insights Using Custom Tooltips In CRM Analytics

Enhance Insights Using Custom Tooltips In CRM Analytics

Net zero as a Service In CPG Industry

Net zero as a Service In CPG Industry

How Do We Import an External Library into Salesforce Lightning?

How Do We Import an External Library into Salesforce Lightning?

  • Introduction To Lightning Web Runtime (LWR)
    Previous PostIntroduction To Lightning Web Runtime (LWR)
  • Next Postwhatsapp integration with salesforce marketing cloud
    Introduction To Lightning Web Runtime (LWR)

Related Posts

All About The OmniStudio FlexCards
OmniStudio Salesforce

All About The OmniStudio FlexCards

Boost Customer Experience With Repeater Widget in CRM Analytics
CRM Analytics Salesforce

Boost Customer Experience With Repeater Widget in CRM Analytics

Enhance Insights Using Custom Tooltips In CRM Analytics
CRM Analytics Salesforce

Enhance Insights Using Custom Tooltips In CRM Analytics

How Do We Import an External Library into Salesforce Lightning?
Lightning Salesforce

How Do We Import an External Library into Salesforce Lightning?

Leave a Reply (Cancel reply)

Your email address will not be published. Required fields are marked *

*
*

ABSYZ Logo

INDIA | USA | UAE

  • About us
  • Article & Blogs
  • Careers
  • Get In Touch
  • Our Expertise
  • Our Approach
  • Products
  • Industries
  • Clients
  • White Papers

Copyright ©2022 Absyz Inc. All Rights Reserved.

youngsoft
Copy
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “ACCEPT ALL”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent. Privacy Policy
Cookie SettingsREJECT ALLACCEPT ALL
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.

Functional

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

Performance

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

Others

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

SAVE & ACCEPT