Questions tagged [controller-extension]

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

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

Is it possible to for a controller extension and visualforce to override BOTH New and Edit buttons?

I currently have a controller extension + visualforce overriding the New button on an object. I'd like to to see if it's possible to reuse this for the Edit button as well. If so, are there any ...
1
vote
1answer
35 views

Custom component setter value being passed in to controller, but getter always returns null (or the initialized value)

The setup: I have a standard controller with two extensions on it. <apex:page standardController="Contact" showQuickActionVfHeader="false" extensions="ExtOne,ExtTwo"> <c:...
1
vote
1answer
64 views

how to make test class for controller with parameter canvas.toDataURL()

I made extension class and VF page for getting signature image. I confirmed it works well through many test . And then, I need to make test class to deploy that extension class into production org. ...
1
vote
1answer
21 views

help to define inputtext for a controller extension

I need to add a detail button to the Lead page to provide data entry for a custom child object ( Interest_Criteria__c ). In my controller extension I have: public class ...
1
vote
1answer
390 views

Apextest: Calling addFields, Fields needed in Extension

I'm trying to write a test class for my controller extension. In this extension I used addFields to add custom fields which i already filter with !Test.isRunningTest(), so it wont cause an error ...
1
vote
3answers
182 views

QueryString value is accessed in method but not in constructor from Test Class

I am a newbie to salesforce and currently is learning Apex Test Classes. Here i came up with a situation that when i use accId = ApexPages.currentPage().getParameters().get('account'); constructor,...
1
vote
0answers
93 views

Visualforce component field value bind issue

I have following class /** * extension class for handling VF page actions */ global with sharing class SQX_Extension_Random_object extends SQX_Controller_Sign_Off { private ...
1
vote
1answer
84 views

Visualforce save only changed objects [closed]

I have a visualforce page with a custom save method in which I'm saving multiple objects. I want to save only those objects which got modified. Currently I'm doing an upsert on all objects when save ...
1
vote
1answer
21 views

How to query for the object message__c in my program?

a lot of you might find my question really basic but I am beginner. I am writing a visualforce page and here is my code. public class CustomControllerExtension1 { public Account ...
1
vote
1answer
518 views

How can i open a pop up box with event information when event url is clicked in the Full calendar?

I used jquery full calendar and this pageload() on document.ready with list of events in calendar. Here is my Controller: <apex:page controller="NetworkCalendar" standardStylesheets="false" ...
1
vote
0answers
47 views

Conditionally Validate fields on VF page

Here is what I need, I have 12 * 3 (36) number fields named after each Month(Jan,feb,march...etc,.) on the VF page for 3 years 2016, 2017 and 2018. Now, if my start date is Jan 2016 and end date is ...
1
vote
1answer
188 views

I am trying to override contact page with custom look up.Getting error

Error:while clicking custom lookup saying "Unknown constructor 'LookupPopupController.LookupPopupController()'" Visualforce page : <apex:page StandardController="contact" extensions="...
1
vote
1answer
377 views

Visualforce page usingbase standard controller

I have the following Visualforce page and controller: <apex:page standardController="sObject" extensions="ExtensionController"> <div> {!o.Id} </div> <div>...
1
vote
2answers
1k views

How to redirect to a VF page with a VF button

I have a mySObject__c and a page mySObject_Button_Page with <apex:page standardController="mySObject__c" extensions="mySObject_Button_Extension" title="{!mySObject__c.Name}" tabStyle="...
1
vote
0answers
60 views

Attachment Parentid population

I have two VF Pages. Say V1 , V2 where V1 is my parent page and V2 is included in it. Here in V1 an instance of a custom object (Call) is created and in DML insert it gets into the system. In V2 ...
1
vote
1answer
479 views

Accessing Case.ContactId from Case StandardController (for Controller Extension) on [New]

I'm building Custom Console Component pages to display with Case detail in Service Console to display other recent cases, assets, related Contact/Account details, etc. leveraging the Case.Id that is ...
1
vote
1answer
2k views

Test class for VF form can't refer to input: 'variable does not exist'

I am very new to the model-view-controller and have barely been able to get my code functional, but now I'm struggling even more trying to write test code! This is my first wrapper class, controller ...
1
vote
0answers
404 views

Unable to create an instance of extension {CLASS NAME}

I'm getting this error, i'm sure I what this means. I couldn't find anything helpful anywhere.
1
vote
2answers
217 views

Expression cannot be assigned at line

How could I assign a value to a dynamic query field? I want to make an update of a record. ac.get(campo) = totalAcumulado.get((String)ac.Name); <-- Expression cannot be assigned at line This ...
1
vote
0answers
1k views

Need to create a new custom object record (new order) based on the current page record (current order) using custom VF

I have an Order custom object which consists of order items. Once this order is delivered to a a store for a customer, I want to add a button (on the order) that allows the employee to reorder any ...
1
vote
0answers
68 views

How can we associate this process to one record? (Record Id in Controller, Prepopulate Field A and prompt user input for Field B.)

Really looking for some help/insights here..Any guidance would be greatly appreciated!! Here's my scenario: A record id can be obtained in the controller using ApexPages.currentpage().getParameters()...
1
vote
0answers
488 views

How can I make it so that everytime constructor is going to get called?

I have a page A contains another page B by apex:include. however when every I tried to refresh the page using rerender the constructor won't get called. page b has a standard controller and extensions ...
1
vote
0answers
663 views

Issue with overrided Cancel button not update related fields

I am implementing a visualforce page with a customized 'cancel' button and 'cancel' function in the controller extension Here is the sample code <apex:form> <apex:pageblock> <...
0
votes
3answers
2k 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
3answers
31 views

Set an inputfield inside a vf controller

I have a field on a VF page when a user insert a value in that field and click a button, that value has to be pass to a variable inside the controller extension. The input field is: <apex:...
0
votes
3answers
1k views

Controller Error: expecting right curly bracket, found 'for' at line 12 column 8

I am gathering some data for a bar chart. I cannot see why it keeps yelling at me for the right curly bracket. Error: Compile Error: expecting right curly bracket, found 'for' at line 12 column 8 ...
0
votes
2answers
33 views

Controller Test to Cover Delete

I have what I think is a simple controller and test class, but when I try to compile the test class, I get an error related to my deleteAddress() method: System.QueryException: List has no rows for ...
0
votes
1answer
274 views

How to fetch apex:input field value into extension class

I am trying to get the value that user enters for the Start Date and Team Name fields into the Extension class as mentioned below but i am getting Null. Could someone please help. VF page: <apex:...
0
votes
1answer
58 views

Visualforce Page Error

I am getting an error when I try to save data from a Visualforce page calling a controller method. Can anyone help me figure out how to avoid this error? The error is: List index out of bounds: 1 ...
0
votes
2answers
2k views

Access a variable in VF page from Controller without using get set method

I have a visual force page as below: <apex:page standardController="Interview__c" extensions="SkillReviewExtension"> <apex:form > <apex:pageBlock title="Candidate Skill ...
0
votes
2answers
118 views

Compile Error: Initial term of field expression must be a concrete SObject

I have a custom controller extension below which pre-populates the Opportunity ID and a Contact Role ID to a Visualforce page for a custom object that has a Master-Detail relationship to the ...
0
votes
1answer
986 views

VF ControllerExtension: Too many query rows: 50001 - How to solve

visualforce Extension: public class Autocompletefields_custom1 { public Autocompletefields_custom1(customreport controller) { } //Variable declaration transient public String[] ...
0
votes
2answers
3k views

what's better, custom controller or extension

I need to create a visualforce page that automatically creates a case and an event about the case creation. Once a user lands on that page, which has one parameter identifying the account, if the ...
0
votes
2answers
46 views

Retrieving list variable value defined in a method in a class into visualforce page

I am trying to retrieve the list variable into visualforce page which i have defined in a method inside apex extension class. I am getting error, could anyone please help. In the below code in vf page ...
0
votes
1answer
737 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
1answer
668 views

How to get a Javascript variable to the apex controller class

Below is a VF Page I have. I do get the alert message with the URL. I am unable to get theValue variable value in Apex controller. Am I missing something here? <apex:page standardController="...
0
votes
3answers
711 views

Value '[X]' cannot be converted from Text to core.apexpages.el.adapters.metadata.VFSObjectELAdapter

Faced with problem when saving the Task (Log a Call) record. This error shows up below field Subject on edit layout. My save Method is: Public PageReference saveRecord() { Task ts = new Task()...
0
votes
2answers
647 views

Pass value from the visualforce page to a global variable of a class

I tried to pass the input field variable value(as provided by the user) to a global variable in the controller. I have the following code. <div class="Modal"> <apex:pageBlockSectionItem ...
0
votes
1answer
2k views

How to save fields from visual force page with extension as controller

I am trying to save value user select on picklist field to Opportunity object field. my visual force page is as follows. <apex:page id="thePage" standardController="Opportunity" extensions="...
0
votes
1answer
192 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
2answers
38 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
2answers
3k 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
1answer
25 views

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

Page <apex:page standardController="Account" extensions="PickListClass"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > ...
0
votes
1answer
114 views

How to use extension with custom controller

In my page, I get following error: Unknown constructor 'InstagramJsonToApexUserBio.InstagramJsonToApexUserBio(InstagramIntegration controller)' Here is my code: <apex:page controller="...
0
votes
2answers
976 views

Delete link on visualforce page fails to delete record

I have done in the sorting, pagination and alphabar navigation and edit/delete link on the same page in standard controller/standardList controller. However, the delete link is failing to delete the ...
0
votes
3answers
683 views

ReRender outputPanel via commandLink not reRendering anything when pressed

Background: I have a requirement where we need to display a VF page on the Contact object that indicates whether or not a contact has had their contact information verified within the last 14 days ...
0
votes
1answer
362 views

Replace custom object tab with a VF page/tab AND keep original SF classic looks

Right now, I have a custom object Errol__c. It has its own custom tab. I wish to make a Visualforce Page that will look exactly the same as when I press the custom object tab. That is, there should ...
0
votes
2answers
735 views

How to Reference Variables in a Controller for a Visualforce Page

I wrote a large class within my Controller and I cannot figure out how to allow the variables contained within the controller to be referenced on a Visualforce page. Why can I not just use {!data....
0
votes
1answer
63 views

How to compare a duplicate list values and delete it

I have a use case where in 1 Order Contains multiple OrderItems, and these orderitems contains records. lets say there are 5 orderitems to 1 order, and among 5 orderitems 2 are duplicate and 3 are ...
0
votes
1answer
31 views

Test Class For FinishURL StandartsetController

I have an APEX class that ends with a finishURL method; this class is the controller-extension of a VF page. What they all do is to collect the IDs of the selected items on a related list view, then ...

1
3 4
5
6 7
9