2

We have the button (parameters in the screenshot):

enter image description here

Button or Link URL value is {!URLFOR($Setup.TRHC__ConfigSettingsHierarchy__c.TRHC__InterviewFeedbackSiteURL__c)}TRHC__ShowJobInterviews?id={!TRHC__Job__c.Id}.

The button's URL contains a domain from Custom Setting TRHC__ConfigSettingsHierarchy__c.TRHC__InterviewFeedbackSiteURL__c. Value of the Custom Setting is https://truhealthcare-developer-edition.na80.force.com/. The value is a URL to external Salesforce Site.

I expect when the button is clicked it will open the page like: https://truhealthcare-developer-edition.na80.force.com/TRHC__ShowJobInterviews?id=a101P000004rzI4QAI

But when I click the button on Lightning Experience it goes to URL https://truhealthcare-developer-edition.na80.force.com. And /TRHC__ShowJobInterviews?id=a101P000004rzI4QAI part is not there.

UPDATE 1:

When I change the Button URL to {!$Setup.TRHC__ConfigSettingsHierarchy__c.TRHC__InterviewFeedbackSiteURL__c}TRHC__ShowJobInterviews?id={!TRHC__Job__c.Id} it goes to https://trhc-managed-dev-ed.my.salesforce.com/one/https%3A%2F%2Ftruhealthcare-developer-edition.na80.force.com%2FTRHC__ShowJobInterviews?id=a101P000004rzI4 which is invalid URL.

UPDATE 2:

I changed the Button URL to https://{!$Setup.TRHC__ConfigSettingsHierarchy__c.TRHC__InterviewFeedbackSiteURL__c}TRHC__ShowJobInterviews?id={!TRHC__Job__c.Id} and modified the value of the custom setting to truhealthcare-developer-edition.na80.force.com/. When I click the button it shows a popup with the message We'd like to open the Salesforce page null... in a new tab. Because of your browser settings, we need your permission first. And if I click OPEN button on the popup it goes to about:blank#blocked URL.

How to make the Button URL work properly?

  • Don't know what else to say, then. I'm not sure you can do what you're trying to do. – sfdcfox Mar 21 '19 at 5:42
1

If you want the button to redirect to a URL, please try with a lightning component which can be then put inside a quick action. Take the custom setting and you can append the recordID in JS in the component and make it redirect in the init of component.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.