Questions tagged [urlfor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
26 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 ...
0
votes
1answer
21 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/{!...
1
vote
2answers
50 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 ...
0
votes
1answer
158 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 ...
2
votes
1answer
65 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,...
1
vote
0answers
33 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 ...
2
votes
0answers
56 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....
0
votes
1answer
649 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....
0
votes
1answer
83 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="...
2
votes
0answers
68 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 ...
-3
votes
1answer
60 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....
1
vote
0answers
1k 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 ...
1
vote
1answer
233 views

Why am I getting Invalid target parameter for function URLFOR error?

Everything work fines if I use a static resource instead of using a method in it, such as apex:image value="{!$Resource.Testprod1} where testprod1 is a static resource. apex:image value="{!...
1
vote
0answers
393 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 ...
0
votes
1answer
227 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 ...
1
vote
1answer
415 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 ...
0
votes
0answers
268 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 ...
0
votes
1answer
204 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 ...
3
votes
1answer
1k 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')}",...
0
votes
1answer
153 views

How to get a controller variable in a URLFOR using a command button

How if I want to have a controller variable in URLFOR like below. 'practiceId' in the below code is my variable in controller. <apex:commandButton value="New Notes" action="{!URLFOR('002/...
0
votes
1answer
734 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 ...
2
votes
0answers
50 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 ...
7
votes
1answer
301 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 :...
1
vote
1answer
2k 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....
2
votes
1answer
727 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 ...
2
votes
0answers
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')}); ...
3
votes
2answers
438 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.
2
votes
2answers
4k 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: <...
0
votes
1answer
301 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 ...
0
votes
1answer
658 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 ...
0
votes
1answer
856 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 ...
0
votes
0answers
349 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 ...
3
votes
1answer
702 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" ...
4
votes
2answers
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 ...
7
votes
2answers
713 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 ...
2
votes
1answer
586 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 ...
3
votes
2answers
605 views

How to get a controller variable in a URLFOR

@import url({!URLFOR($Resource.brand, '{!cssName}')}); Is it possible to call an apex variable in the path section of a URLFOR if the styling varies in some cases? In the above code in the ...
3
votes
0answers
186 views

Get Chatter Group Link with URLFOR

Would like to add a link to a chatter group to a visualforce page. Following best practices was trying to use {!URLFOR()} so the page doesn't break if the chatter group url format changes. However, I ...
4
votes
1answer
597 views

Debug URLFOR parameter

Users in a certain profile (in production) cannot see a new Visualforce page (or rather, a component within the Visualforce page) I've added to the Opportunity layout. The error is Content cannot ...
3
votes
1answer
285 views

Salesforce1 Mobile Card

I have created a visualforce page that is essentially a button that will be placed on a Contact's page. When pushed it will redirect the user to another visualforce page and carry along the contact id....
2
votes
1answer
670 views

Why is my Site.UrlRewriter implementation not affecting URLFOR()

I have a Visualforce Page running on a Force.com Site that looks like this: <apex:page standardController="Page__c" extensions="RootTemplateExtension"> {!URLFOR($Page.Master, null, ["id"="...
0
votes
1answer
524 views

Dynamic Id on $Action.Account.View

I try to do something like this : <script type="text/javascript"> var id = myObject.customId__c; var myLink = '<apex:outputLink value="{!URLFOR($Action.Contact.View, id)}">Test<...
1
vote
1answer
1k views

Redirecting in flow without code

I am trying to redirect my flow back to a standard page using this <apex:page standardController="Opportunity" > <flow:interview name="My_First_Flow_New_Primary_Contact" ...
1
vote
0answers
95 views

Validate parameters passed into the URLFOR function

What is the best way to check if parameters passed into a URLFOR function are valid? I am trying to pass in a target and id without any inputs or an override param. Example: URLFOR(param1,param2) ...
3
votes
1answer
1k views

How to create a Task with Due Date using URLFOR

I want to code a button on a custom object to generate a task with some precompleted fields. I can do it like this: /00T/e?what_id={!My_Object__c.Id}&tsk5="This is a Task"&tsk4={!TODAY()+21}&...
1
vote
0answers
389 views

Issue with URL rewrite when having 2 or more parameters

I'm facing an issue with my site where URL rewrite is not working using URLFOR() for 2 or more parameters. As per an answer on Stack Overflow this is an existing issue. Site.UrlRewriter Interface ...
2
votes
1answer
862 views

URLFOR statement in outputLink to direct to object creation page [duplicate]

So I want to put a button on a visualforce page that when pushed it will redirect the user to a new custom object page. However, this custom object has 4 various Record Types. I can construct the ...
2
votes
1answer
1k views

URLFOR Action to New Object for specific recordtype

I have a custom object that has various record types. How would I construct URLFOR statement to take me to the new action for a particular record type? URLFOR($Action.Relationship_Detail__c.New) The ...
1
vote
2answers
120 views

More generic action command

I have an apex:outputLink that redirects to an Account detail page, selectedId is the Account Id, eg: <apex:outputLink value="{!URLFOR($Action.SObject.View, selectedId)}" //pseudocode example ...
5
votes
1answer
17k views

Using URLFOR() to refer to the current page dynamically

I need to add a link to a VF page which opens the current page with an additional parameter (to allow an embedded VF page to redirect to itself as a non-embedded page). I have this, which works: <...