Skip to main content

Questions tagged [urlfor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
38 views

adding if condition to the list button which returns url

I've a list button which returns a URL & I need to add a condition based on the user id IF( $User.Id = Apttus_Proposal__Proposal__c.APTS_SalesDeveloper__c, {!URLFOR('/apex/x?sObjectType=...
batuayyildiz's user avatar
0 votes
1 answer
4k views

How to add Base URL to a formula field [duplicate]

I have a formula field where in I am displaying a url in the text message. The formula looks like this https://mycompany--staging.sandbox.my.salesforce.com/&Id but I want this url as a base url so ...
user134185's user avatar
0 votes
0 answers
857 views

Custom button with content source as URL: Illegal URL or an improperly formatted request while opening VF page

I am trying to open a VF page in community site and in Salesforce using same custom button added on Opportunity Layout. I tried multiple ways to achieve this, but nothing working as expected. ...
87092's user avatar
  • 273
0 votes
0 answers
296 views

URLFOR Button Open then Close Page

I created a Visulforce Page that generates a word document.I have a button that opens the Visualforce Page where it Displays in existing window without sidebar with the Button or Link URL below: {!...
CodeMonger's user avatar
0 votes
3 answers
971 views

Url hacking in lightning after comma text values are not capturing

On Custom button i am passing the url and In below code snippet Notes__c field is long text area field. when i click on custom button values are populating but in notes field if user mention comma ...
cloudZigZag's user avatar
  • 1,376
0 votes
1 answer
451 views

Multiselect picklist values are not prepopulating while clone using custom button URLFOR

Created custom button and added on page layout in lightning i want to clone specific fields only so using url hack. {!URLFOR('/lightning/o/Request__c/new?&recordTypeId=0129C000009CIiu&...
cloudZigZag's user avatar
  • 1,376
1 vote
1 answer
917 views

Is there anything similar to {!URLFOR($Action.Attachment.Download, attachmentId)} which we can use in LWC

I have attachment Id and I need the URL for that particular attachment. Right now In visualforce we have {!URLFOR($Action.Attachment.Download, attachmentId)} to get the URL. But In my LWC component I ...
AdityaHM's user avatar
  • 133
0 votes
0 answers
520 views

Pass Account ID Using URLFOR

I have a Visualforce Page that uses the standard Contact controller with a controller extension. The page is embedded on the Contact record layout and displays a related list of a custom object that ...
J. Neilan's user avatar
  • 1,243
0 votes
1 answer
456 views

upload icon is not applying for use tag in lightning component

I have uploaded Icon's in static resource as a zip format and when i am trying to get upload icon from them while saving component it is throwing error. No function found for key: URLFOR: Source <...
cloudZigZag's user avatar
  • 1,376
0 votes
1 answer
3k views

construct a URL with pageReference params from LWC [duplicate]

I am trying to construct a URL PageReference to a visualforce page passing in paramaters for Docusign use. This is working in Aura and also as a Custom URL button using a {!URLFOR} function, so I ...
Alarmed_Win's user avatar
2 votes
4 answers
4k views

How to redirect to standard lead convert page in lightning

Currently, I'm working on lightning migration. So, I'm converting the javascript buttons to related quick actions & quick actions with the vf page respectively. I'm facing issues with the ...
Pavan tej's user avatar
  • 1,410
0 votes
1 answer
345 views

URLFOR custom object redirect not working with communities

{!URLFOR($Action.CustomObject__c.List, $ObjectType.CustomObject__c)} is not working within a community whilst logged in as the community user. The page loads but onto the 'Invalid Page'. This ...
TimChadwick's user avatar
3 votes
2 answers
4k views

Create Custom URL Button for Case Creation - Field Pre-Population

I am trying to create a custom URL button that will be placed on both a Person Account and a Business Account page layout. I want the button to launch a case creation form with record type = "Member ...
Ricki Reay's user avatar
0 votes
1 answer
859 views

How to get URL for SLDS standard asset in Apex Code?

In Summer 17 Release (v.40) Salesforce provided a way to retrieve URL for item inside Static Resource within Apex which was very required feature and which was asked many times (like in this question)....
Patlatus's user avatar
  • 17.8k
4 votes
1 answer
2k views

How do I pass the selected list to a lightning component via URLFOR

You can now launch a lightning component from a list view button using the URLFOR() function with a lightning component that implements the lightning:isUrlAddressable interface. As part of the URLFOR()...
Dave Roberts's user avatar
0 votes
1 answer
3k views

Redirect to a url on a click of custom button through if condition

Hey i am trying to redirect on a url on a click of custom button which will create a new quote in which name will be prepopulate as same as parent opportunity name but it is not redirecting on a page....
Sam1's user avatar
  • 3
0 votes
1 answer
2k views

Conditional custom button on page direct to URL if condition = true, display message if false

I have a custom button on a custom object page from which I generate a VisualForce PDF document (Content Source = URL). There are conditions, however, where the PDF should not be generated based on ...
Irene's user avatar
  • 1,885
0 votes
1 answer
289 views

Dynamic static resource in custom visualforce email template

Background I am trying to add a dynamic link in a visualforce email template to download a PDF which is stored as a publicly available Static Resource: <a href="https://x.cs.force.com/site/{!...
Robs's user avatar
  • 9,426
2 votes
2 answers
840 views

Any way to create a link to a custom setting's "manage" page?

In a custom (Visualforce) setup page, I would like to provide links that open the "Manage" view for some of our custom settings. Can URLFOR (or some other mechanism) provide such a URL? This also ...
Keith C's user avatar
  • 137k
0 votes
1 answer
1k views

Redirecting from javascript to custom url in callback function with Visualforce.remoting.Manager.invokeAction

I have a custom visual force page. I use Visualforce.remoting.Manager.invokeAction to post data and create a custom object on a custom Apex Controller extension. This action creates my custom ...
David Geismar's user avatar
2 votes
1 answer
275 views

How to set picklist value in URLFOR?

I'm trying to set a picklist value in URLFOR. I have a custom button and when the button is pressed the following javascript is executed: window.parent.open("{!URLFOR( $Action.Custom_Object__c.New,...
lemdev's user avatar
  • 427
1 vote
0 answers
44 views

Adding a sibling record via Visualforce in Lightning

Scenario Custom object Basket__c is the Master of two Detail custom objects: Fruit__c and Vegetable__c. Visualforce page vfAddVegetableFromFruitPage is embedded via standard Page Layout ...
Chris Valdivia's user avatar
3 votes
0 answers
160 views

SLDS Assets global variable not working from Visualforce?

I'm blowing through some Trailheads and this bit is not working: <apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5....
Sean Harrison's user avatar
0 votes
1 answer
3k views

How to clone a Case as a child case with particular record type

I am trying to create a clone as a child case with different record type but when I clone it it it taking parent case's record type. my code is: /{!Case.Id}/e?clone=1&cas5=CAR&cas28={!Case....
Shweta Shinde's user avatar
0 votes
1 answer
183 views

URLFOR error on only on one Sandbox?

My code is pretty straightforward and it works in my development Sandbox but not in the Testing Sandbox. Here is my markup: <apex:column headerValue="Account"> <apex:outputLink target="...
Austin Evans's user avatar
2 votes
0 answers
120 views

How to only show the friendly URL on a force.com site?

On a force.com site, how do I force the URL Rewriter to always display the friendly URL (eg: /profile/johndoe) instead of the VisualForce Page (eg: /Profile?id=xxxx)? Calling the URLFOR function in ...
Julio's user avatar
  • 165
-3 votes
1 answer
387 views

how to pass parameter in the var that is using URLFOR

var iframe_url = '{!URLFOR("/apex/MemberVerification?memberReferral={!Contact.Active_Member_ReferralId__c}")}'; Above is piece of code, but not working as expected. I have a button in the detail page....
developer sfdc's user avatar
2 votes
0 answers
3k views

apex:outputLink target="_blank" from VF in Lightning now opens records in a Classic view

I'm seeing some previously unseen behaviour changes in Lightning Experience, Summer 2017. I have a VisualForce page embedded as a tab of a Lightning record page. About two months ago I added some ...
Charles T's user avatar
  • 11.1k
1 vote
0 answers
698 views

Unable to pass Custom Parameters to a Visualforce Page via URL button in Lightning Experience

I've a Custom Object whose NEW and EDIT Standard Buttons/Links have been overridden with a Visualforce Page. This Custom Object also has couple of Record Types on it. I've added a Custom URL Button ...
VarunC's user avatar
  • 6,040
0 votes
1 answer
505 views

How to handle type-dynamic force:navigateToObjectHome in Lightning Out?

To make a Lightning component also navigate properly in Classic I am capturing events in a Lightning-Out Visualforce page and transform them for the Classic world. I didn't came up with a way to ...
Robert Sösemann's user avatar
1 vote
1 answer
711 views

URLFOR to Override Clone Button

I have a custom object with two record types. I've written a Visualforce page to override the Clone button on the object. However I only really want to override for one record type (PCS). My solution ...
Josh D's user avatar
  • 163
0 votes
0 answers
407 views

View Button override - Redirect to a VF page or standard detail page based on Recordtype using URLFOR on page action method

I need to restrict View button override based on Record type of Opportunity using page URLFOR function on page action method. Based on the record type, I need to redirect the page to standard detail ...
Pavan Renjal's user avatar
0 votes
1 answer
369 views

URLFOR Action Help

I am trying to create a button that will create a new record related to the record I am on. The issue is that I cannot get the lookup relationship from the related to master to populate on default ...
cmmoutes13's user avatar
  • 1,057
4 votes
1 answer
3k views

Wrong use of !URLFOR inside a controller of aura component

I'm trying to get a .js file inside a zipped file loaded in Salesforce as Static Resource from the controller of an aura component. When I use: baseUrl: "{!URLFOR($Resource.layer_composer,'js/lib')}",...
L.benedettini's user avatar
0 votes
1 answer
3k views

URLFOR on VF Page - Help with specifying record type

I have the following URL on a VF page. I want the link to take you to the details entry point and not the record type picker screen which is currently happening. I can't find a good documentation ...
Matt M's user avatar
  • 1,497
2 votes
0 answers
82 views

Validation error unable to open URLFOR page

I have a custom VFP with few validations on it and when the user submit the page it run through validations and display any errors (if any) But the problem I'm having is that whenever there are some ...
Nick's user avatar
  • 7,153
8 votes
1 answer
471 views

URLFOR($Action.CustomObject__c.New) Not working since Summer 16 release

The following snippet works well on a sandbox that's still on Spring 16 Lightning Experience but gives the same code gives an error on a sandbox running the Summer 16 release from a visualforce page :...
Dunisani Matt's user avatar
1 vote
1 answer
3k views

URLFOR: Invalid parameter for function

I do get the below error randomly and could not able to figured out what causing this error Error: Invalid parameter for function URLFOR Error is in expression '{!URLFOR($Action.Attachment....
Nick's user avatar
  • 7,153
2 votes
1 answer
1k views

URLFOR() not preserving retURL through Record Type selection

I'm trying to add an <apex:outputLink /> tag to a VF page and use the URLFOR() function to direct the user to create a new Case. I want it so that when they save or cancel on the new Case ...
dBeltowski's user avatar
  • 3,068
2 votes
0 answers
1k views

How to use URLFOR in lightning [duplicate]

How to load a background image in my lightning component. Here is my code. **Header.css** .THIS body{ background-image : url({!URLFOR($Resource.folder,'Images/BG.png')}); ...
Akhil's user avatar
  • 178
3 votes
2 answers
1k views

URLFOR formula - documentation not available

Can anybody point me to the documentation for this formula please? I was not able to find it in the VF dev guide/help.
SF Learner's user avatar
  • 1,037
2 votes
2 answers
6k views

Passing parameters through URLFOR() function not working in javascript

When click on activity name in my visualforce page, another visualforce page will open with parameters. Iam passing two parameters to visualforce page through URLFOR() function. Code Snippet: <...
Murali Mohan Mandadi's user avatar
0 votes
1 answer
411 views

Unable to Change Record Type after Overriding with VF Page

I've overridden the 'Edit' button on a custom record with a Visualforce page and now I can't change the record type. It'll let me go to the 'Change' screen, click continue, but then the record type ...
Command-Z's user avatar
0 votes
1 answer
1k views

insert link to a field in a formula field

I have a child object to Case. That child object has a formula field that automatically gets populated with the account associated with Case. I want it to be a hyperlink. So it should show Account's ...
user21352's user avatar
  • 317
0 votes
1 answer
2k views

display link to download an attachment in an email

Scenario - Case object has a custom child object (sample_case_child__c). That child object will have some file attachment. When a case is sent for approval, the email sent out to approver should show ...
user21352's user avatar
  • 317
0 votes
0 answers
550 views

URLFOR error in Visualforce email template

I need to change a Visualforce email template written by someone else. They included a URLFOR in the template. Apparently it used to work, but now when I try to view the template in Setup, there is ...
David Cheng's user avatar
  • 7,433
3 votes
1 answer
883 views

How to specify what page a URLFOR Action calls

I have a visualforce page that basically saves a contact object but can be accessed from two different pages. I have this command button: <apex:commandButton value="Done" id="doneButton" ...
saint's user avatar
  • 307
4 votes
2 answers
1k views

Pass JS variable as a parameter in URLFOR

I have the following code: URLFOR($Action[objectname].New, null, [mode='autocomplete',suggestValue='"+queryTerm+"']), '')}" queryTerm is a JS variable and I wanna pass it as a parameter for ...
Airton Gessner's user avatar
7 votes
2 answers
864 views

Can record data affect the results of a URL Action without parameters?

In my developer sandbox I have created a simple custom url list button that has the following: {!URLFOR($Action.Custom_Object__c.New)} When I use this button on some of my record it results in ...
Jenny B's user avatar
  • 10.6k
2 votes
1 answer
742 views

Custom knowledge:articleList not working

I want to build my own custom container, but I can't seem to get it working. My Configuration: The DataCategoryGroup is called: Knowledge_Base The DataCategory is: testCategory I have 10 articles in ...
Wim's user avatar
  • 584