Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [controller-extension]

A controller extension is an Apex class that extends the functionality of a standard or custom controller.

0
votes
0answers
13 views

Mailing Address Suggestions not showing in Lightning Component

I have a lightning component which is used in the community. When I have added mailing address field in the code, I can able to see the field but suggestions are not coming as we see in lightning ...
0
votes
0answers
16 views

Einstien Analytics Dashboard error: Aggregate query must have measures

I have a requirement where the old dashboards(created earlier to 2017) should be converted to new dashboards. Now when I click on "New Dashboard Designer" from old dashboard edit page, I will get a ...
1
vote
2answers
116 views

Variable is not visible

I have this variable which returns key from custom settings. below is the code related to this private static String AccLinks { get { if (Acclinks == null) { ...
1
vote
1answer
38 views

Test Class for Controller Extension Visual Force Page

I am trying to test my controller extension, Although the final score coverage hit into 100% but when i checked my tests log in my dev console i got Error. This is the ERROR Message: System....
0
votes
1answer
58 views

How to pass list view selected items from one visualforce page to another

So I have a custom object called Transactions, and have recently made a list view button that will redirect the user to a visualforce page that will show the selected record, and provide a few buttons ...
0
votes
2answers
74 views

How to pass multiple selected values from apex:selectList to controller?

I haven't been able to find an answer to this as all the answers are somewhat different to what I'm trying to achieve. Summary before giving the details: apex:selectList where the values are ...
0
votes
0answers
25 views

Visualforce - Passing data from a child visualforce component to a parent visualforce page

I have successfully created a visualforce page (parent VF page) that includes a visualforce component (child). Using the parent controller, I need to retrieve a variable (a list of custom object) ...
0
votes
2answers
167 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
1answer
55 views

Save PDF Visualforce as attachment - mergefields not showing

I really need your help because I'm completely stuck. I want to render a PDF from a Contract in Salesforce, and save it as a record's attachment. I followed several tutorials and I created a PDF ...
0
votes
1answer
87 views

How to attach a file to a custom object from a visualforce page in lightning experience

I need to attach a file to each record of a custom object from visualforce page in lightning experience.Here the i have tried so far but this fails to attch the file. VF Page: <apex:page ...
-3
votes
1answer
177 views

How to call this pointer in static context [closed]

I have one static class in that where I'm calling one methods using this pointer in my apex class, I'm getting below error. This cannot be referenced in a static context below statement shows you ...
1
vote
1answer
165 views

Variable does not exist in method

I am trying to pick up the value of a visual text input and validate if it exists in the database, the problem is that it throws me the following error "Variable does not exist: searchDir" I leave my ...
0
votes
1answer
80 views

How to add new lead to related list of custom object?

i have overridden new button of lead object. My requirement is to add lead object to the related list of the custom object "journey". I have created a lookup field called Journey id on lead. I have ...
1
vote
1answer
34 views

Getting multiple values from controller to visualforce page?

So I'm still very new to coding and Apex. I have a custom object called Invoice that is a part of a managed package that some users in my org do not have access to. So basically what I'm trying to do ...
1
vote
2answers
350 views

Add Custom Error Message to VF Page

I am trying to add a custom error message to a VF page. My controller saves, but when I save my VF page without the checkbox field being checked, it saves anyway and bypasses the error condition in ...
0
votes
1answer
115 views

Unknown constructor

I have a page that creates a CSV of account and related data, i am trying to add a block that shows the users related to that account via a contact. I have followed a few tutorials on how to make a ...
0
votes
0answers
18 views

How do I set rendered to false for apexoutputPanel based on custom sObject property?

I have a custom sObject, my_event__c. I added a checkbox field in the Salesforce UI called 'Hide_Buttons__c'. If this item is checked on the record, I have an outputpanel on a VF page, that I want to ...
0
votes
1answer
22 views

Visualforce inputField Isn't Saving to Variable

Here's the piece of my markup that includes the inputField: <apex:form > <apex:pageBlock mode="edit" rendered="{!reportAppRendered}"> <apex:inputField value="{!...
0
votes
1answer
70 views

How to dynamically provide options and update a field when an option is selected [closed]

The code I wrote is not setting updating the field on the same window, and my other method would refresh the page, and field is not updated until I refresh the page manually. My goal is to provide a ...
0
votes
1answer
27 views

How to call Same vf page from another VF page with Output Fields?

I have two VFpages In 1st VF Page: I have a 3 input field and I am entering data I have a button(Standard/custom). When I click on this button, It should redirect to another page(2nd VF Page) ...
-2
votes
1answer
98 views

Null reference in loop?

I'm getting this error: System.NullPointerException: Attempt to de-reference a null object when I'm trying to pass child records to new record creation(order_LIne_item__c). Here I have nested ...
1
vote
2answers
55 views

Setter value not arriving in apex class

I have a list that contains a collection of wrapper class instances called tacList. The wrapper class effectively contains a checkbox which relates to a case field and a string. The string is not ...
0
votes
1answer
81 views

Visualforce - infinite redirection loop

I have the following Visualforce page that overrides the "View" action of a standard object: <apex:page standardController="Opportunity" extensions="OpportunityDispatcherCx" action="{!redirect}"/&...
0
votes
0answers
57 views

Visualforce iframes don't work from mobile app

I need to include an external website inside a page or redirect the page viewer to an external website. To achieve this I tried a few methods: Visualforce page with javascript that redirects - this ...
2
votes
1answer
308 views

get set from controller extension to visualforce page

I have a controller with extesion from which I try to pass the subtitle values to my visualforce page but I cant seem ro render it. My system.debug('subtitle 1 '+ subtitle ); gives : subtitle 1 {...
1
vote
1answer
53 views

Visualforce parameter passing to controller in sandbox, but not production

I have a visualforce page that runs a flow and use a custom controller extension to set the finish location based on the user profile. (Basically it re-directs back to the original opp record, which ...
2
votes
1answer
111 views

How should I write and structure a good Apex Page Extension Test method?

I'm on the Advanced Apex Specialist Superbadge step 8 and I'm writing the test class, but what they are asking for seems different from what I've been taught about test methods. I thought that I ...
2
votes
1answer
87 views

Fetching related objects data from standardcontroller extension into visualforce page

public class TrackerExt { public String OpportunityId {get;set;} private final Opportunity opp; public List<Tracker__c> trackers{get; set;} public TrackerExt(ApexPages....
0
votes
1answer
56 views

reference in visualforce the lookup field on child record in master detail

<apex:pageBlockTable value="{!oldSubscriptionAndAsset}" var="assetAndSubs"> <apex:column> <apex:facet name="header">Asset</apex:facet> <apex:...
0
votes
0answers
55 views

How to set a secure non-session cookie?

My current setup is a force.com site using a guest user license as well as a URL rewriter class. In the site template, I have added a PageReference action from an extension controller to set a cookie ...
0
votes
3answers
733 views

Getting selected value from <apex:inputField> (dropdown) to a controller variable

I am working on a custom VF page for a case screen with extension controller class in use. <apex:actionRegion > <apex:inputfield label="Action" value="{!case.Action__c}" id="Action" > ...
0
votes
2answers
31 views

System.NullPointerException: Attempt to de-reference a null object(about feeditem object)

I'm trying to add an action on Visualforce Page which enable end users to post messages on a case. But when I click the button, I get an error like: System.NullPointerException: Attempt to de-...
0
votes
1answer
100 views

Redirecting to new Record after inserting does not work

this is a follow-up question to: How to clone and selectively change fields on cloned object? Situation: I want to clone a custom object, update a few fields and insert the cloned object into the ...
0
votes
1answer
31 views

Issue using a standard controller and an extension

In a VF page I have a table like this : <apex:pageBlockTable value="{!lPrest}" var="prest"> <apex:column> <apex:facet name="header">Prestation</apex:facet> ...
0
votes
1answer
521 views

Insufficient access rights on cross-reference id, while attaching a file to case

When the user is trying to attach file in vf page its getting error. But the user is able to attach file from UI directly to the same case. OWD is Private for the case object and when we give ...
0
votes
0answers
79 views

How to keep the state of a Visualforce page when navigating from 1 page to other

How can I have the state of the Visualforce page when moving from a search page which returns a list of records, to the detail page of an individual record when clicked. When returning back to the ...
-1
votes
1answer
936 views

Delete records in Visualforce page data table [closed]

I created a Visualforce page with the following controller extension: public class StudentsControllerExt { public student__c NewStudent {get; set;} public StudentsControllerExt (ApexPages....
-2
votes
1answer
163 views

Test Class for the RemoteAction with HttpsRequest

Controller: global class GetcontentCalloutClass { public GetcontentCalloutClass(ApexPages.StandardController controller) {} public static Map<String, String> respStrings; global static ...
0
votes
1answer
66 views

Error in Visualforce page with standard controller and continuation in extension controller

This is the error I get with the following controller and visual force page: Error: Unknown method 'Module_Test2__CM_Components__cStandardController.renderResponse()' Error is in expression '{!...
0
votes
0answers
282 views

How to show two different object data in a table using wrapper class in vf page?

i have ywo object one is Account and Consumotion__c, account is master and consumption__c is related list of account . i want to show data in table like this in this data is shown like in 1st row ...
0
votes
1answer
940 views

Apex Class for Extension AND Standard Controller Save Button

I have a visual force page using an extension and the standard controller. I added a pagereference save() action to the page but it is only updating the child and grandchild records. How can I get ...
0
votes
1answer
93 views

How do I export feed placed on any Account record in the PDF format?

Can anyone tell me how we can export feed placed on any account record as PDF. I want to do this via custom Button that will export the feed in as pdf ?
-2
votes
1answer
370 views

How to update multiple records from one page?

how to update the field(Next_Step__c ) of multiple records via one Visualforce page, i have write save method but its not update the multiple records vf page: <apex:page Standardcontroller="...
4
votes
1answer
88 views

Challenging (but fun) problem: Consolidate address validation webservice code for use within Visualforce Componet used by different Objects

Salesforce Kahunas, I need help understanding if the following is possible, and then help consolidating the code pieces into the appropriate spots. I had a requirement to use a WebService for ...
-3
votes
1answer
215 views

How to concatenate a static value to a field?

I have a custom object (project) in that I've project name field(Text). Once I enter the project name, "fita" should be added to the end. For example, if I enter ABC for project name, then it should ...
0
votes
2answers
1k views

How to test class called through a button with Visualforce

I Have this apex class which is called trough a button calling a visualforce page. How do I test my Pagereference in my testclass? I do not have coverage from // Code we will invoke on page load. ...
0
votes
0answers
72 views

Issue with StandardController addFields() on WorkOrder sObject

I am overriding the 'New' button on the WorkOrder standard object with a Visualforce page. My users will be creating their WorkOrder records from the Case object. I want to get the CaseId using the ...
4
votes
2answers
40 views

Problems with getParameters testing

I have written a very simple controller extension to show some data from a related list in a Visualforce pdf. public with sharing class adviceRelList { public adviceRelList(ApexPages....
0
votes
1answer
68 views

Save PDF error : SObject row was retrieved via SOQL without querying the requested field: Opportunity.Signature_Date__c [duplicate]

I'm trying to get a "Save PDF" button working on my HTML visualforce page and keep getting the error message above. I've searched everywhere and cannot find a solution and have also been working with ...
0
votes
1answer
23 views

Error: Unknown constructor 'PickListClass.PickListClass(ApexPages.StandardController controller)

Page <apex:page standardController="Account" extensions="PickListClass"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > ...