28
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://<...
17
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 ...
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 ...
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=...
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 ...
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 ...
8
votes
Accepted
Referencing Externally Available Images Absolute URL with My Domain?
I solved this in our org by changing the URL to the following:
https://mydomain.my.salesforce.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000
...
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 ...
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. ...
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 ...
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="...
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....
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 ...
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);
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....
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 ...
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]')...
5
votes
Accepted
Custom Button Issue
Please change the URL to:
/500?rlid=RelatedCaseList&id={!Case.ContactId}
And keep the button behaviour as Display in existing window without sidebar or header
Please let me know if it works.
...
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 ...
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 ...
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 ...
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. ...
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 ...
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/...
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 ...
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 ...
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 ...
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 ...
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);
...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
url × 399apex × 82
visualforce × 76
lightning × 38
urlhacking × 34
marketing-cloud × 30
custom-button × 30
lightning-aura-components × 25
community × 25
lightning-web-components × 24
parameters × 23
javascript × 19
redirect × 17
email × 13
pagereference × 12
force.com-sites × 11
ampscript × 10
lightning-experience × 10
button × 10
visual-workflow × 9
hyperlink × 9
formula × 8
lightning-datatable × 8
images × 8
api × 7