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
0
votes
1answer
651 views

How to refresh parent window which is standard vf page of lightning when the same page helped in obtaining a new window?

I have a custom made action in the standard contact page(call it "myaction") and to that action i have given a another URL say "/apex/mypage" . So when you click on the action "myaction" it redirects ...
0
votes
2answers
108 views

How to pass the value of a command link to different pages and perform action based on it?

I have a scenario where I wound choose a command link value based on the chosen value an action will be performed for "next" button in the third page which is a common page for both the command link ...
0
votes
1answer
110 views

Null Pointer exception to add blob to list of blob

I have below piece of code where I am getting a Null pointer exception adding blob to a list of blobs. Can someone let me know my mistake please? Apex code counter=1; form = integer.valueof(...
0
votes
1answer
219 views

PageReference | Page - How to set pageReference in unit-test for extendedClass

I have a VFP called myUIPage that has some input fields, some of which are bound to the Opportunity object ("standardController='Opportunity'"). There is also some functionality for this page that ...
0
votes
3answers
433 views

VF page with Edit / Del in page layout not working correctly

I have added an vf page in layout which contains Edit/Delete links. <apex:column HeaderValue="Action"> <apex:commandLink value="Edit" action="{!editAccountContactRole}...
0
votes
1answer
423 views

Queueable interface and getContentAsPDF

today i'm facing some issues with the queueable interface. This is my use case: i gave to send an email with a pdf attachment when an object is created. This is my solution: When user create a ...
0
votes
1answer
325 views

Redirect to detail Page not working

Please find my below code where Redirecting to Detail Page is not working based on boolean value. Can someone please let me know the root cause? Apex Controller: public class CallReplica_controller {...
0
votes
1answer
274 views

white spaces in the Page Reference parameters stops me to redirect from VF Page to standard record creation Page

I have written a VF Page which redirects to standard record creation page based on some condition But actually its not. I have found that there were spaces in the parameter included in the page ...
0
votes
1answer
4k views

Redirect to edit page and then to detail page from apex [duplicate]

I am trying to deep clone the objects. I got the code for deep cloning from a blog http://christopheralunlewis.blogspot.com/2012/04/clone-plus-clone-salesforce-objects.html which is working perfectly ...
0
votes
0answers
294 views

Adding items to a related list of a new Object after insert? Or; Save & Add functionality?

The data is a bit complex in parts so I'll lay it out this way: We have Custom Object A; this is the lowest object in a tier set of them. We have Custom Object B; this is the highest object, and ...
0
votes
2answers
742 views

Saving a visualforce page embedded in Page Layout of Account object redirects abnormally

I have a VisualForce page inline1 embedded in Account page layout. While hitting the save button in the visualforce page it redirects to some other url : https://c.ap1.visual.force.com/apex/inline1?...
0
votes
2answers
1k views

Open new tab for pagereference, i dont have a command button cannot use 'Target' attribute

thanks @kevan When the User clicks on the Custom link on a page layout, new tab should open routing to the url as formulated in the controller. VF page is behind the custom link. I dont want to use ...
0
votes
1answer
469 views

Unable to cover few lines in Test class for pagereference

I am unable to cover the last 3 lines in the following class. Following is my APEX.. public with sharing class redirectOrderPartner { public String currentRecordId {get;set;} public List<...
-1
votes
3answers
48 views

“update object.relatedObject__r” caused “Attempt to de-reference a null object” error in Unit Test

The code is working. Just to make it in Production, I need to do proper unit test to make sure the code coverage is above 75%. In the Controller Extension, I made a simple Page Reference to save the ...
-1
votes
3answers
11k views

Test class for PageReference method

Hey I've written a controller for my VF page with a PageReference method. The pagereference is working fine but I'm having some issues with the test class. Controller class public with sharing class ...
-1
votes
2answers
4k views

Test class for Page reference

controller class. public class ExhibitAadminTier { public list<Min_Tier_threshold__c> accon{get;set;} public Min_Tier_threshold__c agnt{get;set;} public Integer mintier{set;get;} ...
-1
votes
1answer
244 views

How to test PageReference in testmethod API 27.0

My Code coverage is 43%. I am not able to test the Method which returns PageReference method. In my case method is pass(). public static testmethod void test1() { String strGUID1 = ...
-2
votes
2answers
1k views

How to Redirect same page After clicking save button?

I have created visual force page for updating records from the page. . in my code Owner__c is Parent, Vehicle__c is Child. once i enter value owner object discount__c field , i need to update same ...
-2
votes
3answers
798 views

How to Redirect to the visualforce page based on the custom picklist selection in visualforce page?

My visualforce page having custom picklist field with some values, When i select one value that should be redirected to a visualforce page and when i select another value that should be redirected to ...

1 2 3 4 5
6