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
Luciano Castro2019Luciano Castro2019 

Hide "Navigate to this page" popup when clicking a button.

We have a Subscribe button that will take you to a different webiste when you click on it. In Lightning, when you click on the button, the Navigate to this page message will pop-up. 

Button: Subscribe 
Display Type: Detail Page Button
Behavior: Execute JavaScript
Content Source: OnClick JavaScript 

Code: 

window.open('/apex/ConnectSignup?FirstName={!URLENCODE(Contact.FirstName)}&lastname={!URLENCODE(Contact.LastName) }&CompanyName={!URLENCODE(Contact.Company__c)}&email={!URLENCODE(Contact.Email)}&ContactId={!URLENCODE(Contact.CDSContact_ID__c)}');

Is it possible to add another line to prevent the pop-up from opening and take our user directly to the website?
Salesforce seekarSalesforce seekar
hello Luciano , 

Its a standard behaviour , we cant escape the pop up . 
 Note: Please use force:NavigationUrl and remove window.open as this tag will not work in sf1 experience and you might run in issues. 

br 
Shanmukh