A controller is one piece in the Model-View-Controller (MVC) architecture of Visualforce. A controller can be a standard or custom controller and extensions to controllers can written.

learn more… | top users | synonyms

0
votes
1answer
23 views

Wrapper Class Question

So I have two custom Objects. One is Called Order and One is Called Inventory. Inventory will contain a list of items that are currently available and I would like to create a button of sorts on the ...
1
vote
2answers
28 views

Code without sharing information

If with sharing or without sharing is not specified in the following, will only the controller run with sharing? I think only apex controller and anonymous block will respect the OWD and sharing ...
-3
votes
0answers
25 views

Trouble Creating a Test Class for a Wrapper Controller [on hold]

With the help of google I found the following VF and Apex Controller that enables the user to create multiple records from the same page. Here is the Controller: public class ManageListController { ...
1
vote
2answers
40 views

Save Error: Entity is not org-accessible

i have this issues when i try to save my method in a test class, when i delete this method from the class the error disappear. @isTest public with sharing class Test_xxx_Controller { The error is in ...
-1
votes
0answers
22 views

How to deal with multiple object lists (some are input fields and some are output fields) and how to render each row in the table individually [on hold]

i have four objects,object1, object2, object3, object4. i need to add object2 as lineitems to the object1, based on object2 name query to get the object3 record values and display as output field ...
0
votes
1answer
27 views

How to create a vf page to with controller with a list of accounts [closed]

Since i am new to salesforce, I would like to create one simple page with custom controller? Can any one give a small class and page that how to call controller in vf page?
0
votes
1answer
46 views

How to pass map attribute to apex controller

I am in a complex situation here. I want to pass a map attribute defined lightning component(which is a map of maps as shown below) to apex controller. Map Attributes <aura:attribute name="...
2
votes
1answer
42 views

Simple System.debug not working

I'm not able to see any System.debug(); calls from my Apex class in my debug logs, which is being called via JavaScript Remoting in a Visualforce page. Client Portal APEX Controller (@RemoteAction ...
2
votes
2answers
42 views

System.NullPointerException: Argument 1 cannot be null

I have a controller and I wrote a test class for it, the test class is giving me the error message I mentioned in the Title. This is the controller: public with sharing class OpenedAccountsController ...
0
votes
1answer
42 views

Campaign Influence Related list missing after enabling it.. Also missing the opportunities in the opportunity related list at Campaign level

I've enabled the campaign influence and after it Campaign Influence Related list missing after enabling it.. Also missing the opportunities in the opportunity related list at Campaign level
0
votes
1answer
17 views

How can I call a schedule class from trigger before the due_date__c field?

I want to call the schedulable class before 15 days of due_date__c field.I have written batch class and schedulable class.Now, don't know what to do?
0
votes
1answer
18 views

vissualforce save method in controller

my requirement is when ever i click on save button the record should save in the database but while definig the field names like studentname__c,english__c it shows an error:"the studentname_c " is not ...
0
votes
1answer
22 views

Custom Controllers and VF Pages - How is the Constructor Called and How to Implement in a Test Class?

This question is partly from curiosity and partly for practical reasons. I have several different custom controllers, and they all take a StandardController as a parameter. Where is the constructor ...
0
votes
0answers
20 views

Command Button Action Not getting called

.common { display:none; } .test { border-style: none; } table.list { border-width: 0 !important; } tr.dataRow td { border-bottom-width:...
0
votes
1answer
14 views

Bind Collection To PageReference Parameter?

I have a list of 15 record ids. I converted it into string (comma seperated value). Now I want to pass this string using pageReference but in url it gives only 10 records. What can I do? Code: for(...
0
votes
0answers
11 views

How to show one contact record in the detail page using next and previous button? [duplicate]

I Created two visualforce pages. One is to display contact records and another one is contact detail page.Every Record Having link to redirect another detail page. In this detail page i need to add ...
1
vote
1answer
23 views

How to write a method in vfpage controller to call different different vfpages for different rec types

I have an object called Industry__c. It has 3 recordtypes Shipping, Sales and Marketing. I have created 3 VFPages. ShippingVFPage, SalesVFPage and MarketingVFPage. Shipping VFPage: <apex:page ...
0
votes
3answers
27 views

VisualForce - rendering two boolean fields

I'm trying to create a condition on a VF page to show me a field only if the two conditions are met. (I.e. I want to use the 'rendered' attribute twice) Here is my code: <apex:inputField value="{!...
1
vote
1answer
24 views

Pass Contact's Account Id from VF page to controller

I'm trying to follow this simple example. Controller public class MyController { private final Account account; public MyController() { account = [SELECT Id, Name, Site FROM ...
0
votes
1answer
34 views

Two Visualforce Page Same Controller

I have an issue that I am using two VF page with common controller. One VF Page is normal and other is opened as a modal on the 1st Visualforce page. I am adding some elements on 1st VF page in a list ...
0
votes
0answers
15 views

Having 2 components communicate through same page [duplicate]

I am trying to build re-usable code and trying to componentize out my code. So there's a main section in my code and a side widget. The widget filters the content in the main section. Here is the ...
0
votes
1answer
23 views

Constructor not defined: [CheckPostalAddress].<Constructor>()

I have created a extension class and when i try and deploy i get the error as described in the title. I have searched in the internet, but cannot see a resolution, therefore, if anyone has any ideas, ...
0
votes
1answer
26 views

Page reference on the current record page

I have a silly problem but I'm not able to find a solution. I have a VF page inside a record detail page. Inside the VF page I have a command button. At the end of the function inside the button ...
1
vote
0answers
30 views

How to add Back, Previous and Next buttons to detail record page of an object using visualforce page

I want to display some contacts in table and if i click on any one record on table it's redirect to details page. To get this i developed the following controller and visual force page. controller: ...
0
votes
0answers
31 views

i click next button display single record details in visualforce page

i have 50 records in one object, those REcords are display in visuaforce page and, once i click first Record that is display the record details in another page then click Next button display another ...
1
vote
1answer
26 views

Get null values from map

//map to store attachments against categories for(MyDocument__c mdobj :[SELECT id,Category__c FROM MyDocument__c where id =:accObj.id]){ for(Attachment attobj :[SELECT Id, Name, ...
0
votes
0answers
19 views

Small enhancement in Apex class

The below code makes the Discount = 20.00 when the Promo__c is checked ... but I need to make Discount = 20.00 disappear when the same Promo__c is unchecked ... Could anyone help me out... Public ...
1
vote
1answer
15 views

How to update a managed package when some VF controllers are deleted?

I want to update a managed package to the current version. The problem is that in the later version I've removed some VF pages as well as the controllers for these pages. It turned out that the ...
0
votes
1answer
21 views

Update a single quoteLineItem based on the below condition

I need to update a single quoteLineItem, whenever a custom checkbox "PROMO" is checked, a custom field "Discount %" has to be filled in with "20" in the same quote line item. There can be several ...
1
vote
1answer
32 views

Error: The method object <Constructor>(ApexPages.StandardController) is referenced by Vf Page (VF_FAS_RecordType)

Can someone tell me why am I getting the above error for my controller Visualforce Page <apex:page standardController="Revenue_Reports__c" extensions="FAS_intercontroller" action="!...
0
votes
0answers
27 views

Can't get custom controller's records on a vf page

I'am trying to create a custom controller that will find the contacts from the opportunity contact role and will print them out on a visualforce page along with some custom fields from the contact ...
0
votes
1answer
22 views

Compile Error: Non-void method might not return a value or might have statement after a return statement. at line 11 column 9

I am not sure what is wrong in my code, but I get the following compile error: Error: Non-void method might not return a value or might have statement after a return statement. at line 11 column 9 ...
-3
votes
1answer
22 views

How to get Related Contact Records using sortby Date picklist using javaScript in visualforce?

When i Select SortBy Date using JavaScript Onchange Function in picklist option,Get the Contact Records Based on Date wise like (Today,YesterDay,Lastweek) Using JavaScript in visualforce Page. Plz ...
0
votes
1answer
35 views

how to sort by Date related display the Records in visual force Page

I display 20 Records in Visualforce Page, and Created SortBy: Date Button. Once Click the Date Button it should display selected Existing Records and Previous Records, in visualforce page using in ...
3
votes
0answers
65 views

HTTP post request is not leaving salesforce servers

In sandbox environment, immediately after the callout request I get a callout response "System.HttpResponse[Status=Forbidden, StatusCode=403]" even though I have already configured the domain in the ...
0
votes
2answers
22 views

Visualforce Table Grouping

I cant seem to get the table to be grouped by the ownerID and Sum the Amount withoutadjustments Controller public class ForecastListController { private String GroupParameter = 'Ownerid'; public ...
-1
votes
1answer
45 views

Select the all check boxes by a single click in the header column check box?

My Controller: public class AccountEditController { public String closePopup { get; set; } accountwrapper1 makeEdit; List<accountwrapper1> listAccount = new List<...
0
votes
1answer
23 views

Is there any way to pass Account object to the controller class

I used apex:param but it doesn't pass objects <apex:param value="{!a.Id}" name="AIs" assignTo="{!AId}"/>
0
votes
1answer
47 views

Pass Query parameters from apex controller to JS

How do I pass apex query parameters to a third party url onclick in Lightning @AuraEnabled public static Account getAccount() { Account a = [SELECT Id,name FROM Account LIMIT 1]; ...
0
votes
1answer
23 views

Using a standard controller with and extension on an external site

I am trying to create a case external page that allows for me to use the standard controller with an extension so that they are able to add an attachment if they are wanting to. I had it where it ...
0
votes
1answer
21 views

Test Classes are giving me 'System.NullPointerException: Attempt to de-reference a null object' Error

So I created a VF Page that utilizes a controller class that I created. Now I need to create the test class for the controller and I am having a hard time with this 'System.NullPointerException: ...
1
vote
0answers
24 views

Displaying Hidden Content in Community Builder (Design-Time)

In my Communities Custom ThemeLayout, I have some areas of the layout that are hidden/off-screen (via CSS) and only visible during certain events. For example, I have a "slide-out menu" content area ...
0
votes
1answer
24 views

Populate a Select List of Record Types based on Selected Record Owner's Profile

I am trying to create a visualforce form to create a new opportunity. I want the first action to be selecting the opportunity owner (not the current running user - one user will be creating ...
0
votes
1answer
71 views

Comparison of two dates in if statement

In my controller i try to compare two dates and if it tru return the error message. Date Today = system.Today(); Date StartDateParsed = Date.parse(startdate); if(StartDateParsed <= Today){bring ...
0
votes
1answer
27 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
1answer
14 views

How to add a lookup field on VF page?

How to add a lookup field on VF page. I have custom field Contact__c (lookup to contact) on a custom object. I am adding that as iput field on the Vf page so user can enter that lookup value. I ...
0
votes
3answers
49 views

please rectify error System.NullPointerException: Attempt to de-reference a null object Error is in expression '{!readUser}'

I need your help, I am a newbie in Salesforce. Requirement : Based on employee id need to display assets(like laptop mobile,computers provided by organisations to employees) issued to him by employer ...
0
votes
0answers
72 views

How to open Sub tab in console in Apex Class

I have replaced standard Edit page of contact with VF page. This VF page should be opened for a specific profile . The rest of users should be able to see standard edit page of the salesforce. I have ...
0
votes
1answer
25 views

page redirection is not working in visualforce page

here when i will give any jobid which is available in interview object then after pressing the enter button 1 new page(Feedback_JobID) will open and if the jobid is not available inside the interview ...
1
vote
0answers
17 views

Reloading values on apex component

needs some help. Am a beginner in learning Apex development in SalesForce and am stuck on following: There are two components on one vf page: <apex:page> <apex:composition> ...