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
2
votes
0answers
699 views

Dependent class is invalid and needs to be recompiled

I have written a controller extension and am having difficulty deploying it to production. The extension allows a flow embedded in VF to finish on a Case record created during the flow. The error I ...
1
vote
1answer
3k views

Include radio button for each row in PageblockTable

I am having a hard time to figure out how I can include the radio button select option within the PageBlockTable. I am searching all the cases related to a contact here. Logic in my controller ...
1
vote
1answer
1k views

Sobject list as radio button Select Option

I am building a page where I have contact's first name and Last Name as an input field. When I enter the first and last name, and click search all the cases related to the contact should display as a ...
1
vote
1answer
876 views

Lookup field value in controller extension

I am creating a page where I am able to create a new case related the contact. In my controller extension in createCase() method, I am unable to populate the contact field( Lookup object on case). ...
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 ...
6
votes
1answer
195 views

Queues, Email Notifications, Standard Controller Extensions. Oh My!

Created a controller extension for the standard case controler. we set the OwnerId using custom save logic, but it doesn't seem to matter what i do, Queue Notifications are never sent out to members. ...
4
votes
2answers
178 views

controller extension not found

I created a controller extension for the Contact object. I don't know if it will work or not, because I can not test it. Salesforce is acting like my controller extension does not exist. Error: ...
1
vote
1answer
43 views

Controller Extension Get;Set; and Get();

I do not understand how the get;set; and get(); flow together. I am trying to gather values from a url. I keep getting the Compile Error: Unexpected Token: '='. Furthermore, how would I even test the ...
3
votes
2answers
106 views

SelectOption Method only working before clicking commandButton (quiscksave)

Newb Alert With a basic Extension, I populate a field with a SOQL. The desired behavior is when the lookup field is populated by a user, the second field shows a picklist with only the relevant ...
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
254 views

Accessing a List of object__C in Visualforce page

I have a below class: class abc{ public object__c var1; public string var2; } Assume that in my controller extension I have created a list of class abc: List<abc> somelist=new List<abc&...
0
votes
1answer
333 views

Display elements of List in Visual force page

I have a skill_Review__c object which has two lookup fields in them - Skills__c and Level__c. Below is my VF and controller. I am trying to get the user input on level field by clicking the edit ...
2
votes
2answers
475 views

User input to update a object in a record

My data model: I have a object called skill review which has skill__c,level__c as a lookup fields. I have a interview object which has skill review in a related list. I have a visualforce page where ...
1
vote
1answer
200 views

Comparing the duplicate value in VF page

I have a the below portion in my VF page: <apex:pageBlockTable value="{! SkillReview }" var="ct" > <apex:column value="{! ct.Skill__c}"/> And in my controller I have: public ...
0
votes
0answers
42 views

Using a single button for Save and edit functionality [duplicate]

In my VF page I show both save and edit button. I would like to use only one button for both edit and save. The button label should switch between save and edit depending upon the situation. That ...
0
votes
0answers
710 views

Data disappear when page is refreshed

I have a VF page where I have a input text and output text. I have the VF page in a page layout of an object called interview. I also have a separate edit/save button on the VF page. When I use edit ...
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
100 views

Controller Extension Test Class - Method is not visible

Need some help with updating a controller extension test class. I am getting a "method is not visible: test_session_and_session_benefit.testCreateSessions()" error. This test class is being ...
2
votes
1answer
689 views

Get parent parameter on child's new button override [closed]

I have two objects, Parent and Child. The Parent object has a Url field. I am trying to override the child's Create New button and I need to be able to tap into the parent's Url attribute on the New ...
-1
votes
2answers
178 views

Controller extn test class is failing with error : this ID value isn't valid for the user [closed]

When i run the test class for the below controller extn it is failing with the error System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record ...
2
votes
1answer
44 views

Bypass entry when object not desired on Wizard

I have a case entry wizard, duped and revised from the Visualforce in Practice workbook. My second page asks the users if they want to add Case Team Members. If they put a user in the name box, they ...
1
vote
3answers
4k views

How do I check CRUD and FLS in apex?

Please help me solving this Issue. I'm new to the salesforce, I worte an Controller which do get list of objects values from contact, Cases and also inserts New cases and Case comments to, During the ...
1
vote
2answers
4k views

Re-rendering section on picklist value change - picklist value is always null

On a Visualforce page, I have a picklist (apex:selectOption). When a user selects certain values, additional input fields have to appear. Otherwise, they should be hidden. There are a couple of ...
1
vote
1answer
582 views

The installed managed class zqu.ProductSelectorController is not visible

I am getting this error trying to use a custom visual force page in place of a managed package visual force page. I made my custom controller global, thinking that it was mine that needed to be ...
0
votes
2answers
463 views

Pass Record ID from Account to Visualforce Page without Saving Visualforce Page

I want to pass the Record ID to a visualforce page and reference that ID on an outputLink URL to take them back to the account. The User cannot "Save" the visualforce page, so how can I keep the ID? ...
2
votes
1answer
674 views

SObject row was retrieved via SOQL without querying the requested field: Opportunity.OwnerId

I have the following code: public with sharing class ExportCheckPageController { public boolean checkYes { get{if(checkYes == null) checkYes = false; return checkYes;} set;} ...
2
votes
2answers
4k views

Unknown Property on Controller Extension

So I have a standard controller and an extension that I'm trying to use to call back a list from a different object to use in a PageBlockTable. In the visualforce page I declare my standard ...
0
votes
0answers
56 views

Insert failed. attachmentimg: Class.AttachmentImgController.saveImg: line 26, column 1

Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Parent]: [Parent] Error is in expression '{!saveImg}' in component in page ...
0
votes
1answer
540 views

How can i get case ID in VF page from a custom object? [closed]

I have created a custom object work_order__c in this custom object i have created a case field as a master-detail to work_order__c. How can i get the case id in VF page for saving the workorder? I am ...
0
votes
1answer
70 views

Controller Extension Error

I have a VF page on a custom object and I am trying to create a button that will essentially mark a checkbox field as TRUE and save the record. I created a controller extension and I have a Repeat ...
3
votes
1answer
136 views

User Role with IF Statement

I am trying to populate a field in a Visualforce page for custom object using a controller extension. I would like to populate the field with one value if the User Role of the person creating the ...
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 ...
1
vote
1answer
65 views

How to create contact detail page using controller? [duplicate]

How to create contact detail page using controller? <apex:page standardController="Contact" extensions="ContactDetailController"> <apex:form > <apex:pageBlock mode="maindetail" title="...
0
votes
1answer
794 views

how to create contact detail page using controller [closed]

public with sharing class ContactDetailController { private ApexPages.StandardController standardController; public string conId{get;set;} public ContactDetailController(ApexPages....
0
votes
1answer
50 views

List of existing records in custom object

I am trying to list the existing records for the current user in my VF Page: here is the start of my page with the controller and extension defined: <apex:page id="ChangeRequestList" ...
0
votes
1answer
71 views

VF Controller Test not picking up Field on Parent Object

I have a VF Page for a Custom Object that asks a User for a PIN and checks it versus a field on the Contact Object which is it's direct Parent. This Controller Extension is used for 2 other VF Pages, ...
0
votes
1answer
664 views

Lookup manager Name from User object in VF Page

I am building a VF page for my custom object Change Request. In my object trigger on Save, I populate the Manager field of the record with this code: if (trigger.isBefore && (trigger....
3
votes
2answers
24k views

How to Write Test Class for Standard Controller Along With Extensions

Hi Everyone I'm finding it difficult to write test class for this class Class public class SendEmailReceipt{ public Payment_Receipts__c Rec; public string em{get;set;} public id ...
-3
votes
1answer
681 views

Ending position out of bounds: 18

I have a Custom Edit button. When clicking the Edit it is showing the error as "Ending position out of bounds: 18" Below is the code for class.Thanks public with sharing class ...
1
vote
1answer
436 views

How to access User's Profile fields in visualforce page Javascript portion

I want to access a custom field of my administrator profile in a Visualforce page which has a standard controller i.e. "Company__c". I want to access the custom field in javascript portion of that ...
3
votes
3answers
4k views

Standard Controller OR Custom Controller

When and how to decide whether to go with Standard Controller OR Custom Controller? I have created so many vf pages,classes, extensions but still I'm not sure to include standard controller or custom ...
0
votes
1answer
287 views

Merge Fields not updating in Controller

I have a basic form in which I need to fill in details about a Case. The form also has a section to fill out Account information. So my standard controller is Case with an extension: CaseInputFormExt ...
0
votes
2answers
2k views

Pass a parameter from one controller to another controller

I would like to know how to pass a parameter from one controller to another controller? For example I am trying to pass the accountId value by using the following code in the first controller public ...
1
vote
1answer
55 views

standardController & extensions

Created a Visual Force Page as follows: <apex:page standardController="Opportunity" extensions="c_Scrubber" docType="html-5.0"> the c_Scrubber.apxc class is constructed as follows: public ...
0
votes
2answers
696 views

StandardController.save() not showing validation rule

I have a custom visualforce page with a standard controller and extension class. I have created my own save Function in which I need to first update the standard controller record that I am editing, ...
0
votes
2answers
2k views

Use Account Fields in Case Standard Controller Visualforce Page

I am trying to create a printable packing slip via visualforce page in a button on the case object. I've created the button and everything seems to be working fine UNTIL I try to reference fields on ...
0
votes
2answers
57 views

How to add new fields to a VF page when they are not included in the custom controller used for the page

I have a custom controller and VF page which allow my users to create and save a contract by using several information fields on the opportunity and related account page. Since this was first created, ...
0
votes
1answer
346 views

Cannot create new Product with custom visualforce page

I have a custom visualforce page that has the Product2 standard controller and a class as extension. The objective here is to make it possible to enter the product information, and the user can click "...
1
vote
1answer
600 views

Is apex getter method runs only once regardless of how many times it is called on VF page?

I have a basic question. I have a big VF page with many sections which render/hide based on some flags. The flags are set in constructor of controller extension and are mostly depend on the logged-in ...
0
votes
1answer
84 views

Not getting opportunity against the current account

I am trying to create a Vf page on click of a custom button "Show opportunities" on account detail page.Currently when i preview my Vf page it shows only two button "Proceed with Selected" & "...

1
3 4
5
6 7
9