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 [custom-controller]

A custom controller is an Apex class that uses the default, no-argument constructor for the outer, top-level class. You cannot create a custom controller constructor that includes parameters.

0
votes
1answer
30 views

Updating an array in controller to store user input from Visualforce page

I need to store input from user in controller so it can be used for calculations. To do this I am using an array, to get input in the controller. But getting issue: Subscript is invalid because list ...
0
votes
1answer
69 views

Why can't I access User.ContactId from a lightning component?

I can't get a lightning component that references User.ContactId to compile. Here's my code: TestComponent.cmp <aura:component controller="TestController"> </aura:component> ...
0
votes
1answer
42 views

lightning:inputField is not rendering, saying the request is missing the field data when it is not

I am trying to display a list of date ranges based on an objects start and end dates using a lightning component. When I open it in a visualforce page as part of a set of nested components, it will ...
1
vote
1answer
17 views

How to Implement “fluent constructors” inside visualforce page data iterator?

I am trying to put together a custom controller class implementing the fluid interface builder pattern. Said class does compile, and my question is how can it be implemented inside a VisualForce page'...
0
votes
0answers
22 views

send mass emails from Salesforce using personal emails

We have users who will trigger mass emails to generated leads, child users as a part of their campaign. Till date, it is done using google and we are planning to remove gsuite from our system. When we ...
0
votes
1answer
57 views

Issue with the Trigger

I have a trigger which embeds the account's field value to the child contact field. I have a field named account code on account and when ever a new contact is created under this account, account code ...
0
votes
2answers
38 views

How to get session id of a particular user in Salesforce

Is there any way to get session id of a user so that I want to use it in REST API call in Postman to view the response. When I do the api call using my session id, we are recieving invalid user ...
0
votes
1answer
45 views

Issue with REST API in Production

We have a mobile app(Not Salesforce1) where the data is pulled from Salesforce using REST API. The basic functionality of the app is to return GranChild records when any Search Term is entered in ...
0
votes
0answers
37 views

Communication from Lightning component to Visualforce page to custom controller

I'm following this example: https://developer.salesforce.com/blogs/developer-relations/2017/01/lightning-visualforce-communication.html ... and the example works great. In summary, it basically ...
0
votes
0answers
10 views

communtiy URL Redirecting to another community

I have 2 active communities in my org. When I log in using second community, it is redirecting to First Community URL. instead of https://my-domain/community2name, it is redirecting to https://my-...
2
votes
1answer
37 views

Passing values from apex:page controller to component?

Is there a way to pass values from a controller in a VF page down to a child component? I need a way to do the following: My page: <apex:page controller="myCustomController"> <c:...
-1
votes
1answer
20 views

Test Method for Custom Controller that references Lists in Loops

I have the following custom controller that is pulling some Lists and subsequently looping back through the Lists to do some sums on the values to display them on a Visualforce Page I have only got ...
0
votes
0answers
14 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
11 views

How to use Outputlink to display Contacts next to Accounts

I created a visualforce page to display the contacts of an account in a div next to a pageBlockTable when the account is selected it will display it's contacts linked to it. This is the VisualForce ...
0
votes
1answer
20 views

How to make the target of an output link be displayed next to the pageblocktable?

So I'm having an issue trying to display the contacts of accounts next to the pageblocktable. The functionality I want to occur is that once an account is clicked to display the contacts for that ...
2
votes
2answers
175 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) { ...
0
votes
0answers
31 views

Save selected data by checkbox from vf page to object

if a check box is selected in vf page selected attachment should get save in an object.i need a controller logic. here is my code : <apex:...
0
votes
1answer
35 views

VF page to display custom related list

I have two custom objects: 'MRC Cases' (parent) and 'MRC Case Notes' (child). On the MRC Cases Lightning Record Page I want to display all of the case notes associated with the MRC Case, with the full ...
-1
votes
2answers
37 views

Issue with Action support inside a selectlist

I am working creating a vf page, that has a selectlist showing list of Sobjects. Once anyone sobject is selected it has to display the fields in another selectlist. I tried but I am unable to get the ...
0
votes
1answer
29 views

Working on Search Criteria and limit the number of filters displayed on Search Criteria section

I am working on a Search Function using custom controller. I have 4 Filters (Account Name, Country, Account Type, Contact Name) in my Search Criteria Section. I have a requirements that, it must have ...
0
votes
0answers
58 views

Apex heap size too large: 6125236

I have a visualforce page which is throwing me the error "Apex heap size too large: 6125236" I have referred to couple of similar issues here on stackexchange but this seems to be a different issue. ...
0
votes
1answer
135 views

Display save success message only when the record is saved on VF page

I've a VF page to create cases. It has lot of workflows and VRs associated with it. While saving a record, if there's a VR error, the message shows at the top of page, however, I'm also able to see ...
-1
votes
1answer
61 views

I am facing the error parameter Id is missing,while conga composer from VF page button click

when i select the records in vf page ,after click on the VF Button the conga should be call along with id for generating the PDF but on button click the window is opening but showing error that "ID ...
0
votes
1answer
63 views

Conditional formatting of the Style attribute on apex:outputText in a custom visualforce page

Looking to get some feedback on a problem and have 3 possible solutions which I am struggling to get working. The functionally I am trying to achieve is in an apex:outputText element I want an ...
0
votes
1answer
203 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
0answers
39 views

Not full URL in Referer header in a controller of a Visualforce page

I added a custom VF page in a Dashboard. I want to have the Id of the Dashboard in my controller because I need it in my script. So, I used ApexPages.currentPage().getHeaders().get('Referer'). In ...
0
votes
1answer
61 views

Custom Controller and VF Pages for a Kanban

Looking to get a little help with a custom controller and VF page for a Kanban we will use on our home screen. I have used the code from https://shrutisridharan.wordpress.com/2016/08/22/creating-a-...
0
votes
2answers
44 views

Unable to get Visualforce page form input values in Custom Controller

Controller: public class updateOpp{ public String Name {get;set;} public Boolean selectRecordDel {get;set;} public PageReference submit() { system.debug(Name); system....
0
votes
1answer
24 views

while calling method showing variable undefine in lightning component

This page has an error. You might just need to refresh it. Action failed: c:SComponent$controller$arResult [str is not defined] Failing descriptor: {c:SComponent$controller$arResult} when click ...
0
votes
1answer
114 views

Unknown property 'String.Id'

I am trying to update a VF page and add a new field but am getting an error Unknown property 'String.Id' The field that I am trying to add is Descriptio__c, a depending picklist to Task_Type__c. ...
1
vote
1answer
146 views

Visualforce Input Fields not being passed to Controller

We're running into an issue where values being entered into a Visualforce page are not being passed at all to the controller for the save actions that take place. I'm sure this is something simple ...
0
votes
1answer
29 views

Getting values from picklists into visualforce controller

I'm creating a VF page on Opportunity Products where I have an apex:repeat and inside the repeat, I have a picklist that gets it's values from a SOQL query on a related object. I have no problem ...
0
votes
2answers
137 views

Visualforce Render condition not working when true

I have a custom visualforce page that has page blocks. When the render condition is false, I receive the expected results when previewing. The issue is when I change the render criteria to true and ...
-1
votes
1answer
48 views

How to Calculate a Percent in an AggregateResult Method

I am using a custom controller for a Visualforce page on a custom object (Quote__c). I have an AggregateResult method that sums 3 amount fields to show grand totals on my VF page. I would like to add ...
0
votes
1answer
70 views

AggregateResult Grand Total on VF Page

I have a custom VF controller that uses the AggregateResult method to summarize some fields by year. All that works as expected, but now I want to also pull the total for each metric field for all ...
0
votes
0answers
18 views

Visualforce Page Not Available for Custom Button [duplicate]

I am trying to create a custom List button that will sit on the related list of my Quote__c object at the Opportunity level. I created a VF page and custom controller, but when I create the list ...
0
votes
1answer
58 views

Custom Save button in Apex Controller not working

I have attempted to build a custom Save method for a visualforce page I created, but when I click Save, the page reloads with nothing happening. What have I done wrong? :/ Here is my controller code: ...
0
votes
0answers
91 views

Pass value from one VF component controller to another VF component controller within same VF page without side-effects

I wonder how to pass value from one VF component to another VF component within same VF page. I think that Passing VF Page controller to component and set it as parentController in component Apex ...
0
votes
1answer
49 views

Group products by family [duplicate]

Updated I've updated the question because it was not clear and some of you gave me hints.What i originally want to achieve is the following example on visualforce page I want them to be grouped and ...
1
vote
2answers
160 views

Visualforce page can't find my method?

Firstly, let me apologize in advance for my extreme naivete' in this matter. I'm quite new to VF and could not find documentation to cover what should be an incredibly simply issue. I have a quick ...
0
votes
0answers
33 views

Null Value for record after getting id from a map of ids and accounts

The system.debug shows that the id for TempAcct is associated with the correct id after a.get('Franchise__c'), but NewAcct = null. The debug shows that the id was mapped correctly to filterIds, and it'...
0
votes
1answer
39 views

Javascript Filter In Custom Controller Not Returning Filtered Results to Visualforce Page

I have a custom controller and page with a few lines of Javascript. The functionality should work as follows: when a user enters a state or account name in the parameters, the list of accounts and ...
0
votes
1answer
48 views

Filter for Aggregated List Results in Custom Controller

I have a custom controller with a Visualforce page that displays a list of accounts with aggregated results for each account. I want to create a filter for state and inspection date that would filter ...
0
votes
0answers
17 views

List not showing when using same controller for two visualforce pages

I am working on a lookup like functionality where you insert some text in input text box and after clicking search button a popup page is opened which shows list of accounts starting with name entered ...
1
vote
2answers
47 views

IF clause in VF page to render PDF

Below is my VF code, I need to render my PDF only if status__C = approved. How to achieve it. I'm new to development <apex:page controller="MyController" renderAs="pdf" applyBodyTag="false"> &...
2
votes
1answer
335 views

format .cls file in Visual Studio Code

What extension can be used in Visual Studio Code to format .cls files?
0
votes
1answer
91 views

how to display my field values in VF PDF from controller class for a custom object

my VF code <apex:page controller="MyController" renderAs="pdf" applyBodyTag="false"> <head> <style> body { font-family: 'Arial Unicode MS'; } @page{ size: letter; margin:10%...
1
vote
1answer
25 views

Is it possible to grab buttons on record page from Apex to parse button URL merge fields?

We are letting users select certain buttons that contain a URL in our application. That button now accepts merge fields. Handling '{!Object.field}' and '{!$User.field}' and '{!Today()}', and '{!Now()}'...
0
votes
2answers
43 views

Custom controller won't work in component?

I have a custom controller that i know functions as i want it to. I say this because i can use {!var} on a visual force page and i get that value i want. However when i do the same thing in a ...
2
votes
0answers
128 views

Basic Lightning component audio player [duplicate]

I'm trying to get a hold of the Saleforce stack and so far i have created a custom controller and have access to the data i need on a visual force page. However i'm not sure how to translate this to a ...