Skip to main content

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

How can I inject an Account Id into a vf page url after redirecting to that page?

We currently have a basic homepage for our experience site which we think it pointless and want to replace with a custom vf page that is an account record page. If a user logs in through the log in ...
fbrookie's user avatar
0 votes
1 answer
36 views

Property type misidentification in VisualForce Page

I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process. There were a few deploy errors but I've fixed all but two types. This is one ...
cyberspy's user avatar
  • 210
0 votes
0 answers
29 views

Need to display a validation error in related list custom button

I have a new contact custom URL button in Account related list contact section. But we do have a requirement that user click on that new contact in account related list if account's Phone field empty ...
Buhuni's user avatar
  • 9
1 vote
2 answers
43 views

Custom Controller Extension - Attempt to de-reference a null object An unexpected error has occurred

Trying to add a custom controller to a visualforce page and send through calculated values from that controller to the page to avoid lengthy formulas or conditional statements on the VF page. public ...
Tim Somerfield's user avatar
0 votes
1 answer
25 views

Basic rerender is not working (Visualforce)

I've used this reRender functionality before and I cannot for the life of me see what's wrong with this basic code. Thanks in advance. VF Page <apex:pageBlock> <apex:...
thinker's user avatar
  • 1,442
0 votes
1 answer
47 views

Controller extension -- VisualForce

I am reading the Visual Force Developer Guide '23 because I have something to do with this technology so I am new. I was reading the section Building a Controller Extension and in the first example I ...
sinpasharmi's user avatar
0 votes
0 answers
114 views

Unable to call apex method from ActionFunction in vf page

Here I am unable to call apex method from Action function. I tried many ways but didn't work. Vf Page : <apex:page standardController="Contact" recordSetVar="accs" extensions=&...
anji reddy's user avatar
0 votes
0 answers
32 views

Requesting Help with Writing an Appropriate Unit Test for My Apex Controller Class

I need help writing an apex unit test class for my apex controller class that is being used as an extension for a Visual Force page. The function of the class is to query "Intake__c" records ...
user avatar
1 vote
1 answer
46 views

Visualforce Map Render if Keys Match

In my Visualforce Extension Controller I have 2 Maps using the same Keys Company - Map <Integer, List> Role - Map <Integer, List> In my VF Page I would like the output to be grouped by ...
Jeff Callahan's user avatar
0 votes
1 answer
88 views

Unknown property 'VisualforceArrayList.EHS_Task__c'

I am getting error "Unknown property 'VisualforceArrayList.EHS_Task__c'" while deploying VF page. Below is the page code: <div style="border-bottom: 1px solid gray;border-right: 1px ...
Harsh Shukla's user avatar
0 votes
1 answer
103 views

Apex test class for Standard Controller extensions - Test problem

:) I am writing test class for controller extensions, but I get the error: System.TypeException: Invalid conversion from runtime type Asset to Account. Can you please look at my code, and tell me what ...
ApexNewbie's user avatar
0 votes
1 answer
433 views

How to iterate a sObject in a visualforce page

im new to salesforce I have a sObject (A__c) with a lookup relationship with B__c and C__c. I would like to have a table for each A that displays his related B and C example: A B C How can i ...
MashaMasha's user avatar
0 votes
1 answer
39 views

Using Extension on User does not Return Value for User

I have a standard page. Just following the basic implementation in the Apex Docs, but instead of Account I'm using User. However, the extension is not bringing back any values from the methods in the ...
thinker's user avatar
  • 1,442
1 vote
1 answer
1k views

How Do I Override the Standard Controller's Save Action in My Controller Extension?

I am trying to build a controller extension for the Opportunity standard controller. According to documentation and stackexchange I ought to be able to override the Save() action in the controller ...
willeg's user avatar
  • 313
2 votes
0 answers
88 views

Show <apex:message> for field

I have a controller extension behind a visualforce page. I add an error to the field ("component id" according to documentation?!) in a controller extension as follows: ApexPages.Message ...
powlo's user avatar
  • 2,670
0 votes
1 answer
85 views

Filtering using RecordType using GetSelected()

I have a Visualforce page used to close cases using a list view button, certain case records should be set to a different close status than others when the button is pressed, unfortunately it appears ...
ted's user avatar
  • 3
-2 votes
1 answer
418 views

Add test method to your test class error getting, please help how to resolve [duplicate]

public with sharing class CreateQuotePDFController { public list<QuoteLineItem> quoteLineItemsList{get;set;} public Id getid{get;set;} public Double grandTotalTax{get;set;} ...
user105753's user avatar
-1 votes
1 answer
189 views

Testing Code Coverage [duplicate]

I have only 73% code coverage, however, I've created multiple tests, all which pass. Here is the controller code: public class CaseController { public ApexPages.StandardController stdCntrlr {get; ...
Sarah's user avatar
  • 15
0 votes
1 answer
438 views

Resetting page while displaying success message

I am trying to reset/refresh my page on my form. I want to refresh the page and then successfully display the success message however, it is only refreshing the page. The success message fails to load....
Sarah's user avatar
  • 15
0 votes
1 answer
379 views

Attempted to upsert a null list Error is in expression '{! save }' in component

The full error I am getting: Attempted to upsert a null list Error is in expression '{! save }' in component apex:commandButton in page casepage: Class.CaseController.save: line 15, column 1 Here is ...
Sarah's user avatar
  • 15
0 votes
1 answer
944 views

Standard Controller with Extension Vs with Sharing extention

I am not clear with below two concepts - are both actually same? Standard Controller with Extension Although a controller extension class executes in system mode, if a controller extension extends a ...
Vignesh L's user avatar
  • 121
0 votes
0 answers
47 views

Problem with Testing a New Quote Controller Extension

Updated Sep 10, 2021; see at end. I have written a VF New Quote page that uses a controller extension. The purpose of the extension is to initialize certain custom fields in the Quote and the ...
willeg's user avatar
  • 313
1 vote
1 answer
269 views

Error on Save: How to Inform the User in a Controller Extension

I have built a controller extension for use in a custom NewQuote page (see image below). The controller extension initializes a number of custom fields with data from the Opportunity. The Quote ...
willeg's user avatar
  • 313
1 vote
1 answer
168 views

Display Custom text in VF Page when field value is null

I have a Gantt Chart which is used to show the Project Timeline. I am using Google Charts to display the Gantt Chart. Below is the VF page: <apex:page standardController="Project__c"> ...
SFDCUser's user avatar
1 vote
1 answer
555 views

Convert custom JavaScript button in lightning

I need to convert my javascript button to lightning. What I did is, I go to the classic environment, go to setup and I click on get started for 'Lightning Experience Transition Assistant'. After a few ...
Atiqah's user avatar
  • 23
0 votes
1 answer
440 views

How can I update output values when a lookup field is changed in a Visualforce page?

I'm trying to get the shipping street value that's being shown to dynamically change if the lookup Account field is changed. Here is the visualforce code that I have so far: <apex:page ...
ad_rey's user avatar
  • 59
2 votes
0 answers
707 views

Access Managed package class in an apex class or VF page

I would want to access a managed package class in a VF page on the local org. All the methods and class are global and virtual in the managed package. I have tried using . in the VF page controller =&...
Prady's user avatar
  • 12.3k
1 vote
1 answer
33 views

Why is save method not working for one VF page but works for the other?

Can anyone help please? For some reason, the save method (from controller extension) does not work on one VF page that I created, but works on the other. Heres' the extension class: public class ...
user avatar
0 votes
0 answers
44 views

What would make the same code produce different results in a different sandbox?

I have this test class for a vf controller that runs ok in one sandbox but in the other there is an Id field that is returning null. What am I missing? The reason for creating a second sandbox was to ...
Pauline's user avatar
  • 375
0 votes
1 answer
166 views

Roll up field not displaying whole numbers in Custom Controller

I have a rollup field on the Quote object. When I access that value in my VF page controller, I'm seeing its value getting truncated there. Because of this when I'm seeing less amount on my VF page. ...
salesforce Developer's user avatar
0 votes
1 answer
1k views

Error: Method does not exist or incorrect signature: void getRecord() from the type VFAccount

I am trying to create a custom controller and extension to create account records. But I am stuck with this error I am facing. I have tried many other tips to make this work and but no avail. This is ...
Pranay Agarwal's user avatar
0 votes
1 answer
670 views

VF Page is not updating the record

I have a VF page to update couple of fields on the Opportunity record, it is a simple VF Page like below <apex:page standardController="Opportunity" extensions="Opportunity_UpdExt&...
user81642's user avatar
  • 687
1 vote
1 answer
108 views

No Save and Controller Extensions throw Unknown Property Errors

For clarity, and as I accepted an answer in the last question, I am posting a new question for additional help with new issues. The last question can be reviewed here. Here are my new issues: When ...
Alexis Frisch's user avatar
0 votes
2 answers
1k views

Unknown Property Error on VF Main Extension

UPDATE 12/29/2020: For clarity, and as I accepted an answer here, I am posting a new question for additional help with new issues. The new question can be reviewed here. UPDATE: I am trying to switch ...
Alexis Frisch's user avatar
0 votes
1 answer
360 views

Standard List Controller extension not working

I am preparing for the PD1 exam and I was practicing an example on the standard list controllers using extension. The extension class limits the opportunity to show only 2 records but it is showing ...
Krishnamurthy's user avatar
0 votes
2 answers
1k views

"System.NullPointerException: Attempt to de-reference a null object" when deploying controller + test class

I am trying to learn development while building Apex classes. I got this error upon trying to deploy a custom controller and test class from sandbox to production: "System.NullPointerException: ...
user avatar
0 votes
1 answer
57 views

Controller Extensions no Longer Working

Update I seem to also not be able to render a section based on the value of a user-input field in my form when the logic is called directly within my VF page. Code from VF page User-filled form field ...
Alexis Frisch's user avatar
1 vote
2 answers
244 views

Visualforce - PageBlockTable blank or invisible rows

I have a fairly simple code where I'm querying an object, getting the records and mapping them to a list in order to show them in a VF page. The page is still unfinished but I'm wondering what is ...
Alejandro Flores's user avatar
0 votes
2 answers
83 views

Attempt to de-reference a null object error on User-Input Form

UPDATE Update to my Apex public with sharing class ShouldShowSHSection{ public ShouldShowSHSection(ApexPages.StandardController paramController) { Intake = paramController;} public ...
Alexis Frisch's user avatar
0 votes
1 answer
348 views

Issue with the Visualforce page with the Controller extension

I am trying to create a VF Page on the Case, where I should be able to get the Contact associated with the case. I created a Controller extension like below public with sharing class ...
user81642's user avatar
  • 687
0 votes
1 answer
660 views

How to add delete button on each record in pageBlock table - VF

I have an extension that allows users to input information and I am trying to add delete functionality to each record in apex:pageBlockTable. How can I edit my extension code to add this? What I've ...
patriciajlim's user avatar
0 votes
2 answers
207 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 ...
J. Neilan's user avatar
  • 1,243
0 votes
1 answer
503 views

Getting error as " Error: Unknown property 'AccountStandardController.conList' in VisualForce page"

Visual force page code: <apex:page standardController="Account" extensions="Contactextctroller" recordSetVar="lstacc" setup="false" sidebar="false"...
abhiram reddy's user avatar
0 votes
2 answers
4k views

Standard fields translation

I need to translate product names and their descriptions, using workbench i can only translate cutoms fields. Is there a reliable ISV or API that i can use for translation? thanks in advance
maya's user avatar
  • 13
1 vote
3 answers
431 views

Embed Visualforce Related List on Account

I have a custom object call Account_Addresses__c that has a master-detail relationship to the Account record. I am trying to create a Visualforce page that will be embedded in the Account Detail to ...
J. Neilan's user avatar
  • 1,243
0 votes
2 answers
1k views

How to fetch parent object field from child object's on vf page extension

We have two objects SieBid_Opportunity__c which is child object and SieBid_Account__c which is parent. I have created a vf page with standard controller of SieBid_Opportunity__c which shows the lookup ...
Rahul's user avatar
  • 19
0 votes
1 answer
2k views

HELP displaying related contacts of all accounts in hierarchy?

I want to show in child accounts, the related contacts of the parents and other child accounts too. I almost solved this with a Visualforce Page and a Controller, but the related contacts are shown ...
Enea Gjoka's user avatar
0 votes
1 answer
610 views

Upsert failed.INVALID_ID_FIELD, record id cannot be empty key: []

I'm a beginner developer and I'm building a custom NEW contract button. I'm having issues getting the contract to insert/upsert and I think it has something to do with having a standardsetcontroller ...
Justin Guay's user avatar
0 votes
1 answer
191 views

Attempt to de-reference a null object error after selecting Visualforce page dropdown value

I'm a beginner developer and I'm building a custom new contract button with a visualforce page with dropdown field values that unhide other fields depending on what is selected. Clicking the button ...
Justin Guay's user avatar
0 votes
3 answers
3k views

Save form - Lightning component

I'm trying to save custom object's records using lightning component , the form contain lookup fields ( multi select records ) , i have developed a LC to be able to select multi records on custom ...
user avatar

1
2 3 4 5
9