Questions tagged [pagereference]

A PageReference is a reference to an instantiation of a page. Among other attributes, PageReferences consist of a URL and a set of query parameter names and values.

Filter by
Sorted by
Tagged with
1
vote
1answer
71 views

Visualforce wizard in Community

I tried apply VF Wizard( 1 Controller, 3 VF Page ) to Community but not work.. the Community is for guest user until C page work done, they don't have to login I applied... Guest user profile ...
1
vote
2answers
77 views

Testing page for entry - List has no rows for assignment to SObject

This is the code for a page launched from an Event. It links the Event to a custom object Business_trip__c via a junction object Trip_meeting__c using the Event's ID as a text key. I am having issue ...
1
vote
1answer
189 views

Why can't VF detect my return statement?

I have the following code: Public Pagereference quickSave(){ for(Rights_Tracker__c RT : RightsTrackerList) { if(RT.Actual__c > RT.Agreement__c) { ApexPages....
1
vote
2answers
975 views

getting error as Compile Error: Constructor not defined: [PageReference].<Constructor>(String)

<apex:page controller="openPage"> <apex:form> <apex:commandButton value="Open" action="{!openPage}"/> </apex:form> </apex:page> public with sharing ...
1
vote
1answer
210 views

Page Reference issue in Lightning

I have a command link button on Account page (Create Account). As soon as a user clicks on the button, an edit page gets populated to fill the details. Once the details are filled and hit the save ...
1
vote
2answers
2k views

Redirect to standard page after calling a VF Page from a Custom Button

I have a VF page which is called on click of a custom List Button on a custom objects standard list view. this is supposed to download all the selected records in the page. Now the functionality is ...
1
vote
1answer
105 views

Conditional finishlocations based on variables from a Flow

I am invoking a Flow through a VF page. In the end I want to send the user either to the original record or the one they have just created, based upon another variable. As it is now, the user will ...
1
vote
1answer
308 views

How to Grab URL/Id of Newly Created Record

My visual force page requests 5 inputs. WeatherController then posts those inputs to Chatter and also creates a record from the information. What I'm not understanding is how to "grab" the URL of the ...
1
vote
1answer
602 views

PageReference giving error while getContentAsPDF()

I am having a custom button which is calling a static method. In this method I am getting content in PDF form by using getContentAsPDF() method. This code works fine if i am hard coding the URL ...
1
vote
1answer
2k views

Can a page reference method be called from within a void method?

My use case was--> referenced a void method in the action attribute on an apex:page In the void method, check for a condition. if true, do nothing, else call a pagereference method to redirect ...
1
vote
1answer
821 views

URL Parameters not showing up on browser URL with Action function

I have an action function that fires on a select list change: <apex:selectList label="Select View" id="viewFilter" value="{!viewFilter}" size="1"> <apex:actionSupport event="onchange" ...
1
vote
1answer
764 views

Update record based on checkbox

I have below page where I can show different records under different sections based on their record type. Now I have to update only those records where User checks checkbox Confirm_Attestation_abv__c ...
1
vote
1answer
205 views

Unable to redirect to new VF page

I'm trying to capture orderid from URL and then redirect user to a different visualforce page OrderTrackingClass after finding the orderId Following is what I tried... public with sharing class ...
1
vote
1answer
967 views

Storing session/cookie in VF pages

I have a product details page which displays 1 product, there's an Add to Cart button for user to click. When user click on Add to Cart, the cart will be displayed at the bottom on the same page. I'...
1
vote
1answer
5k views

Displaying a list from a controller on a Visualforce page

I am trying to collect all of the cases that the user saves and display them in a queue at the top right of the page so they can tell which cases have already been completed. I have put a method ...
1
vote
2answers
289 views

Evaluation of approach to navigate between 3 LWC pages

Looking at building 3 screens and each has navigation between them using next, previous. Finish button to complete. I know that I could use Lighting Flows to navigate but I would not want to use it. I ...
1
vote
1answer
2k views

Navigation and PageReference in Lightning Component - Why is url void?

UPDATE: I just verified it works when I navigate to my Lightning Component as part of a Lightning Page. My company is still in classic, so we're wrapping our components in Visualforce. https://...
1
vote
1answer
25 views

How to show different field value in a vf edit page

Right now I have a vf page that shows like this: <div class="col-md-5"> <input id="contactFirstName" type="text" class="form-control" name="userFirstName" maxlength=40 value="{!contact....
1
vote
1answer
222 views

Passing parameter in URL in Lightning component and community pages

will it work in community pages, if yes then how, can you brief me? this is url and i am passing parameter in it as key= sunil https://deb1-coro.cs17.force.com/v2/s/invdetail?key=sunil var ...
1
vote
2answers
1k views

Redirect back to the VF page

In Classic: There is a New button on the VF page. On click of this button default new record create a page of the custom object gets open. On saving of the record, the page gets redirected to the VF ...
1
vote
1answer
2k views

PageReference.getURL() returning URL:[delegate:{MY RELATIVE URL}]

Im am trying to get the URL of one of my PageReferences whenever i call its method to return it to me i get this result URL:[delegate:{MY RELATIVE URL}]. Anyone know if why it's returning this, Please ...
1
vote
1answer
77 views

Apex Inputtext not getting assigned to variable in apex controller

I have below pageblocksectionitem in VF Page. <apex:pageBlockSection showHeader="false" columns="2" id="blockseciframe" > <apex:pageBlockSectionItem > <apex:...
1
vote
1answer
540 views

Save Redirects to blank page

When saving the visualforce page, it redirects to a blank page. Can anyone advise as to why it is not redirecting to the exact url for the current page cited in the PageRefrence at the bottom? When ...
1
vote
1answer
145 views

Unit Testing Apex code and can't set ID for pageref

I am trying to create a unit test for an Apex class that creates a series of records in other tables and then takes the user to one of the new records. This process all starts from a button on the ...
1
vote
1answer
307 views

Visualforce page does not update properly after Apex record delete operation

I have an embedded visualforce page on the Product2 page layout and an extension class for the Product2 standard controller that is used by this VF page. It's a little product photo management widget ...
1
vote
2answers
404 views

ApexPages.PageReference redirect issue when in url # symbol

We started to have redirect issue, when added to url # symbol. So on backend, apex provides redirect to another page: public ApexPages.PageReference submitRequestAction() { //some logic here ...
1
vote
1answer
515 views

PageReference getParameters().put non-unique parameters to pass multipicklist values

I'm trying to pass parameters via URL to a multi-picklist field, but I'm finding that it seems to be impossible to build a pageRefence with non-unique parameters. pageRef.getParameters().put(...
1
vote
1answer
792 views

Return to a VF page from a VF page in Lightning

First I am working in Ligntning. I have created a VF page on a Custom object (Fact Finder) which is a child of Opportunity. This VF page opens another VF page based on another Custom object which is a ...
1
vote
1answer
918 views

Converting Cookie String to List<Cookie>

I have cookie String value returned by code below: HttpResponse response = http.send(request); String cookieString = response.getHeader('Set-Cookie'); Now I am trying to construct a Pagereference ...
1
vote
1answer
731 views

how to show the textbox value of one vf page in another vf page as a label

i am beginner in salesforce, i have made one vf page there is textbox and button in that page on button click i want to show textbox value of my textbox as a label in another vf page on button click....
1
vote
1answer
1k views

how to override addproduct button of opportunity

i want to override the addproduct button of opportunity there is one condition ie if the pricebook is selected than redirect to my vf page and if it is not selected than redirect it to choose ...
1
vote
1answer
67 views

Use standard page views for objects not in the database

With objects that are saved in the database, Apex provides a very nice way to allow you to navigate to a standard detail or edit page. Consider the following: public class CustomController{ ...
1
vote
1answer
379 views

page reference not redirecting properly and stripping parameters

I am trying to create a url in my class it gets created corectly and i am able to see it in debug log but when i pass it to the pagereference it does not redirect correctly. and it strips the ...
1
vote
3answers
565 views

System.NullPointerException: Attempt to de-reference a null object for duraion

I am new to Apex coding. Can someone please help me to resolve the issue. I am trying to automatically display the duration when from and todate is selected. For that i have developed a code in the ...
1
vote
1answer
582 views

Salesforce knowledgebase sitemap.xml

Regarding this article I create dynamic sitemap for knowledgebase. I can't set my page name to sitemap.xml because of dot, only sitemap. And my sitemap available via link http://domain/sitemap ...
1
vote
1answer
2k views

apex:Include and pagereference Issue

Strucked with a different kind of Issue. I'm having three pages page1,page2,page3. I have Included all this pages in a single page by using apex:include like this <div id="apiaccount" class="tab-...
1
vote
1answer
396 views

Heapsize problem on VF page

I am VF page which display records for a custom object. When there are a large number of custom records - I get: HEAPSIZE 6014176 error on page. Any tips?
1
vote
1answer
90 views

Authentication Vulnerability Issue with Page Redirect

We are using a third party company to scan our salesforce code for SOQL Injection and Vulnerability issues with open page redirects. The below code is flagged as a vulnerability. public Pagereference ...
1
vote
0answers
299 views

Upload file to google drive from Lightning component - Page redirect removing URL

I am trying to achieve functionality to upload a file from Salesforce to Google drive. I have done following 1. Google project credentials (Client key , secrete key) 2. Enabled Google drive API 3. ...
1
vote
0answers
45 views

How can I send an email while using PageReference getContent() method?

I am trying to send an email while using PageReference and the getContent() method which is, only ocassionally, throwing an error (seems like every couple of emails regardless of the frequency). ...
1
vote
1answer
35 views

Accounts are not updating when I choose an account type from the dropdown box

I think I need a pageReference for the updateRecordList. Right now it runs but it won't display the accounts with the selected account type. Can anyone explain to me whats wrong? and how pageReference ...
1
vote
1answer
44 views

Page Reference not redirecting

I am overriding the case select Record Type page. The page shud redirect to a custom VF page if selected record type is 'Support' else to the standard Case page VF Page : <apex:page ...
1
vote
1answer
88 views

Populating multiselect picklist from page reference

I'm sending some parameters to custom controller of my object, which should be populated on multiselect picklist. In controller I'm creating a new Page Reference, where I put all parameters by using ...
1
vote
1answer
118 views

Call Excel VF Page from a static method in controller

I have a MS Excel VF Page that perfectly downloads data. Now in main VF Page I am having a remote action static method called using vf remoting from button on main page. From that method I need to ...
1
vote
0answers
274 views

Logout from all tabs when from one tab a user logged out

I have a requirement like ,i have opened 2 3 tabs.And lets say i logged out from 1st tab.Then without refreshing my other tabs how will the user be redirected on to the login page. On tab 2nd there is ...
1
vote
0answers
527 views

PageReference for quote/quoteTemplateDataViewer as PDF is blank

I'm having trouble getting a PDF when using a PageReference to the quoteTemplateDataViewer. This class is creating a QuoteDocument on the Quote record, but the contents of the document are blank. ...
1
vote
1answer
406 views

How to save the dynamic data as pdf or excel?

Here in my page, I select some picklist field values and based on that i will get the data, Then, When i click the "ExportReport" button,Then data need to save as excel or pdf. I know with ...
1
vote
2answers
230 views

Test PageReference Partial URL

I have a few page redirects that do not want to work in my test class. The error I am running into is the partial URL reference. ERROR: System.ListException: List index out of bounds: 0 Class....
1
vote
1answer
768 views

Rendering and Rerendering a command button after submitting a record

I have a two command buttons that are able to save a record. One button fully submits the record and sends it to the edit view. The other save button will update the record if there is anything the ...
1
vote
2answers
320 views

unable to instantiate flow in controller

I'm trying to set the finish location of a flow to the record created in that flow. I've tried setting up the controller a million different ways, but I keep getting an invalid page redirection error ...