Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
29 votes

Getting the URL parameter into Lightning component using the "{! paramName}" expression

After Summer 18 release (API version 43 and up) we can do this. Implement lightning:isUrlAddressable interface and use pageReference attribute. Example. - Component Assume url is https://<...
Ranga's user avatar
  • 1,722
18 votes
Accepted

What is the longest URI that Salesforce will accept through the REST API?

+edit 2020-10-25: Looks like there's some concrete documentation as of API v49.0 (Summer '20). The documented limit is 16,384 bytes. The recommendation is to limit the URI to 2000 bytes, and headers ...
Derek F's user avatar
  • 62k
16 votes

Getting the URL parameter into Lightning component using the "{! paramName}" expression

First thing first. You have written apex:attribute in your question which is not valid, you should use aura:attribute. Next, you have to declare the attributes in the app, not in the component in ...
Santanu Halder's user avatar
14 votes
Accepted

How to pass URL parameters to a Lightning App page, to load LWC in context of a record?

There is native support for query parameters in LWC. To persist, their names need to have namespace added as a prefix. Default namespace is c__. In this example: /lightning/n/MyAppPage?recordId=...
auu's user avatar
  • 331
11 votes
Accepted

Passing parameters to a Lightning Component inside a Lightning Tab

There is no direct support for URL parameters in Lightning for components (only apps can receive parameters). Depending on specifics, there are two possible alternatives that might work. For ...
sfdcfox's user avatar
  • 493k
9 votes
Accepted

LWC: Is it safe to rely on window.location.href to get the page url?

You can check Secure Wrappers and Locker API Viewer to get good idea - but it seems to have access and no documentation which says the access would be revoked. However, the recommended way of getting ...
salesforce-sas's user avatar
7 votes
Accepted

Get ID from URL

Have you tried simply: JobID = sc.getId(); See docs here. This assumes that the standardController attribute on your page is for Job__c and that the URL is something like /apex/YourPage?id=[some ...
Phil Hawthorn's user avatar
7 votes

URL To A Record - Specify A Different Page Layout

You basically have three options: Change the RecordType of the record in question. Change the Profile of the running User Implement a Visualforce override Likely, only door number 3 is viable here. ...
Adrian Larson's user avatar
  • 150k
7 votes

Getting the URL parameter into Lightning component using the "{! paramName}" expression

It is actually much easier to pass URL parameters to Lighning components in a community page. The "trick" is to expose your attributes at design time to the page, so they show up in the Lightning page ...
stwissel's user avatar
  • 379
7 votes
Accepted

Replace ID with API Name

I believe the only way to to it would be to use a VF page as the Link and use an action method to navigate to the report. In the VF page controller query for the report by name: <page name="...
Eric's user avatar
  • 54.2k
6 votes
Accepted

How to query for all tabs' urls?

SOQL won't help you. You need to get them from the Schema e.g.: // Each app for (DescribeTabSetResult tsr : Schema.describeTabs()) { // Each tab of the app for (DescribeTabResult tr : tsr....
Ruslan Vekua's user avatar
6 votes
Accepted

Getting salesforce instance URL from Java

When you call the Partner API login() method it will return a LoginResult. It will have the: serverUrl URL of the endpoint that will process subsequent API calls. Your client application needs to ...
Daniel Ballinger's user avatar
6 votes
Accepted

Encoded number sign ("%23") in URL path

You need to use Map#setAnchor instead: PageReference newPage = Page.NewEmployee; newPage.getParameters().put('empId', empId); newPage.setAnchor('menu'); return newPage.setRedirect(true);
sfdcfox's user avatar
  • 493k
6 votes

Open link in another tab with e.force:navigateToURL

As far as I understand, the navigation event will use the same window/tab if you give it a URL inside your salesforce instance. So, to get what you want, I think you could just use plain JS: window....
Aidan's user avatar
  • 13.7k
6 votes
Accepted

Lightning new URL format navigate to visualforce

The syntax /one/one.app#/alohaRedirect/apex/TestVisualforcePage is not dead yet and will continue to work. As stated here it's not recommended if there is an alternative, but sometimes there is still ...
Charles T's user avatar
  • 11k
6 votes
Accepted

URL Encoding String with just Plus Signs

Consider using PageReference instead: Lead l = new Lead(Est_Credit_Score__c='999', Phone='(999) 555-1212', FirstName='Brian', LastName='Fear', email='[email protected]')...
sfdcfox's user avatar
  • 493k
5 votes

Are service URLs in apex rest service case sensitive?

As per salesforce documentation: The URL mapping is case-sensitive. A URL mapping for my_url will only match a REST resource containing my_url and not My_Url. Also if you are packaging your REST ...
Amit Jain's user avatar
  • 827
5 votes
Accepted

How to open in lightning experience a custom visualforce page that requires parameters?

This looks to be a namespace issue similar to the one described here - currently in review. It can be reproduced using these steps as mentioned on the link Create an namespace on your Developer ...
Gaurav Kheterpal's user avatar
5 votes
Accepted

Visual Force Page which can be accessed by anyone

One way of achieving this would be using Force.com Sites. These let you create a publicly accessible sites using your Salesforce domain. You can then specify which Visualforce pages you want to be ...
Chris Hall's user avatar
5 votes
Accepted

How do I know the Public hosted URL of Visualforce page inside the controller class?

For a Salesforce Site, use the Site class. Namely, you can use Site.getBaseRequestUrl() to determine the current URL of the request. Returns the base URL of the current site for the requested URL. ...
sfdcfox's user avatar
  • 493k
5 votes
Accepted

What does the "one" in lightning url structure reference?

"one/one.app" is a reference to Salesforce1. The same URL is used both for loading Salesforce1 and Lightning. If you're on a mobile device (phone or tablet), you'll see Salesforce1, while if you're on ...
sfdcfox's user avatar
  • 493k
5 votes
Accepted

Play .mov video from amazon in lightning

You have put that URL in Content Security Policy settings in Salesforce. CSP setting determines which content from 3rd party sites can be played/viewed in Salesforce. https://help.salesforce.com/...
Pranay Jaiswal's user avatar
5 votes
Accepted

Passing parameter in URL in Lightning component tab

Welcome to StackExchange, Gaurav! As of the Summer '18 release, you can use the lightning:isUrlAddressable interface to expose the page URL via the pageReference attribute, like this: Include the ...
Shane Steinfeld's user avatar
5 votes
Accepted

How to get past the URL limit error of maximum 4096 characters?

There are a few options, but basically you need to get the bulk data out of the query string. Typically you would do this by using a POST request rather than a GET request. Since a PageReference ...
Daniel Ballinger's user avatar
5 votes
Accepted

How to pass custom parameters to screen flow in public community?

Okay. I figured this out. Once you have added the flow component to the community page, you need to click on it. In the input you should see your input parameters. In my situation, for the UniqueToken ...
paulK's user avatar
  • 323
5 votes

How to pass URL parameters to a Lightning App page, to load LWC in context of a record?

For persistence, I would recommend using location history hash also known as a fragment identifier it can easily be added by accessting wht browser's location object: location.hash = 'your hash' . ...
glls's user avatar
  • 20.2k
4 votes

How to find the vf page name?

This is a force.com URL, not a salesforce.com URL. This means this is a page on a Force.com Site. Try going to Setup > Develop > Sites In there, you should find your Site Label and Site URL. Click ...
Morgan Marchese's user avatar
4 votes
Accepted

Redirect to previous URL - Lightning Component (Communities)

Ok so i figured it out I needed to parse the function like so: redirect: function (){ var url = window.location.href; var value = url.substr(0,url.lastIndexOf('/') + 1); ...
Nebbyyy's user avatar
  • 838
4 votes
Accepted

Error - Failed To Execute Flow - 301 Prefix - Process Builder

The URL format for going to a Flow is: https://INSTANCE.salesforce.com/designer/designer.apexp#Id=VERSIONID INSTANCE is your Org instance (na9, cs26, etc) VERSIONID is the version of the Flow ...
AMM's user avatar
  • 4,704
4 votes
Accepted

Custom Button Formula URL IF condition

Merge fields start with {! and end with }. You don't use them in the middle of a formula. To merge in the middle of the formula, you want to use the concatenation operator, &. However, doing it ...
sfdcfox's user avatar
  • 493k

Only top scored, non community-wiki answers of a minimum length are eligible