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

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.

-3
votes
0answers
24 views

unable to get the row id on click of Add button in vf page

I have a one vf page where i am displaying list of rows and each row with one add button. My requirement is on click of Add button i need Id to be captured in list in controller.
1
vote
1answer
15 views

Value provided is invalid for action parameter [String param] of type 'String'

So my component has an attribute defined like this: <aura:attribute name="accountId" type="String" default="" /> that holds the value of a lookup lightning:inputField. I am setting the ...
0
votes
0answers
23 views

Any alternatives to using Iframe or methods to get my current one functioning?

This is the Visualforce page that I have being displayed. <apex:page lightningStylesheets="false" showHeader="false" standardController="account"> <apex:form > <apex:detail id="...
0
votes
0answers
19 views

Call Apex Controller method from button in Visualforce component table row

I have a Visualforce page which has a few Visuaforce Components to display sections of data, one of which contains a table with an "apex:repeat> for each row. Each of these rows has a button, which, ...
1
vote
1answer
14 views

Having issue with apex:inputfile and apex:repeat. Input being cleared when adding new set

I have created a apex:repeat section with several questions, including a apex:inputfile. Every time I add a new one, the file gets cleared but the other fields are fine. I checked my controller to ...
0
votes
0answers
19 views

Passing Javascript Array to Apex Controller always results in null values [duplicate]

I have a Visualforce page where I want to pass a javascript array in Visualforce to my Apex Controller. However the values are always null in my List in Apex. I have a commandButton that fires ...
1
vote
1answer
26 views

How can I get the name of the current app to the apex controller?

I need to get the name of the current app in the controller. So far I'm trying: public static String getAppName() { UserAppInfo userAppInfo = [SELECT Id, AppDefinitionId FROM UserAppInfo ...
2
votes
2answers
70 views

jsPDF in Lightning component: get blob in Apex controller

I'm trying to use the library jsPDF on a lightning component. The lighting component handles the creation, and needs to pass it to my apex controller (in order to save the file in Salesforce). ...
1
vote
1answer
20 views

How do I populate a Lightning:combobox with content from a map?

I've generated a map in my apex controller which I would like to use to populate a combobox. Simplified code below: Component: <aura:component controller="myController" implements="force:...
0
votes
1answer
11 views

How to post a list of all open positions in a visualforce page without using a Custom Controller?

We want to post all open positions (custom object) to a Visualforce page. I want to keep all the standard functionality of the standard controller, but only show Positions with Status = "Open". ...
0
votes
0answers
12 views

I am trying to resize my duallist box with help of size option in lightning and it is not working

The size is not resizing the width of the list. Not working as given in the specification. https://developer.salesforce.com/docs/component-library/bundle/lightning:dualListbox/example
-1
votes
2answers
47 views

AES128: Apex Encryption to Java Decryption Checksum Generation

I am trying to integrate payment gateway into salesforce site, i have used the AES128 Encryption and same is use for decryption but while decryption i have used java code where i got the decrypt value ...
1
vote
3answers
91 views

How can I get this button to pass data to controller?

UPDATE I have the following function: <apex:actionFunction action="{!selectRec}" name="recordSelectFunction"> <apex:param name="selectedID" assignto="{!selectedRec}" ...
-3
votes
0answers
61 views

Salesforce encryption to Java decryption [duplicate]

I am trying to integrate Paytm payment gateway into salesforce site. As I am not able to understand the encrypt and decrypt of java file. I have converted the java code to apex as similar as possible ...
0
votes
0answers
16 views

how to use .getvalues with map and display the picklist value from custom setting on VF page thoghing null pointer exception [duplicate]

have a custom setting called product and under that i created two fields called and other is string field BD__c. i want to display picklist value based on string matching record. my custom setting ...
0
votes
1answer
28 views

checkbox won't update auraEnabled

I'm trying to update a checkbox field through lightning component and AuraEnabled method but, When attempting to update checkbox field I get error 'invalid field for insert update bad field names on ...
0
votes
0answers
25 views

How do I able to set login landing page according to user's profile

In order to implement my question, I tried overriding SiteLoginController like as below. global PageReference login() { User getProfile = [SELECT ProfileId FROM User WHERE Username=:username]; ...
0
votes
1answer
43 views

<aura:iteration> and input or <lightning:checkboxGroup>

I have a custom object Topics__c that I want list out like so: The text is the topic name which is a String data type. So I have to add in a checkbox along side the Name field. I have been doing some ...
0
votes
2answers
31 views

Passing argument to onclick event

I am dynamically creating HTML <div> and I need to handle the onclick event : when the user clicks on it, I want to call a controller function and this function requires an argument. How do I ...
0
votes
1answer
36 views

Dynamic DOM : firing event on click

I am dynamically creating some DOM elements inside my component's controller and adding them to the page. I need to set the onclick event on these elements to call another controller function that ...
0
votes
2answers
42 views

custom setting not displying correct picklist values based on the condtion

i have a custom setting called product and under that i created two fields called and other is string field BD__c. i want to display picklist value based on string matching record. my custom setting ...
0
votes
0answers
15 views

Unable to get record Id in the custom detail page after clicking save button using lightning

I have a custom new page for contact object..After clicking the save button,it should redirect to custom detail page.It was redirecting,but the record details where not displaying. custom new page (...
0
votes
0answers
17 views

how to display picklist values which is stored in custom settings values based on the condition [duplicate]

` public List getTR_ProductList() { system.debug('******Start of getTR_ProductList'); List options = new List(); options.add(new SelectOption('','--Select--')); Map Prod = ...
0
votes
0answers
25 views

Custom detail page should open when I click submit button in my custom contact page in lightning

I have a lightning component for detail page..When I click Create Contact button,a popup page will be opened.After filling the fields the page should navigate to custom detail page InputPopuppage:: ...
0
votes
0answers
13 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
1answer
25 views

Change field value in lightning component

I'm trying to change the value of the field Instagram_followers__c of my Influencer__c object in my lighthning component. It's a really simple component: a refresh button wich check the number of ...
0
votes
3answers
21 views

Data is not displaying on VF page but coming in Debug logs

Starting date of current week is not displaying on VF page (blank data), but coming in debug logs. Controller Code: public with sharing class Dummy { public date weekStart {get;set;} public void ...
0
votes
1answer
28 views

unlock record submitted for Approval

When a record is submitted for approval, it is locked by default. But as per the recent change by Salesforce, it can be unlocked using Apex class. I have this below Apex class which unlocks the ...
2
votes
1answer
133 views

Error in a formula field

I have a requirement where I need to populate records where a criteria is true. The criteria is the users must have joined in between Jul,2018 to May,2019. I thought I can achieve this using a ...
0
votes
1answer
28 views

Update related objects from list of fields returned from lightning component

I'm getting a List of javascript object from lightning component, that contains updated values and Id of a customObject in form: [{"contact__r.name":"Name","Id":"a3Rn0000000D2wcEAC", 'field1__c':'...
0
votes
0answers
18 views

Einstien Analytics Dashboard error: Aggregate query must have measures

I have a requirement where the old dashboards(created earlier to 2017) should be converted to new dashboards. Now when I click on "New Dashboard Designer" from old dashboard edit page, I will get a ...
1
vote
1answer
47 views

How to set Date field to not exceed today's date in lightning component

I have a requirement where I need Birthdate field on contact to validate so that it does not exceeds today's date. Below is the code: <lightning:input value="{!v.objContact.Birthdate}" label="...
0
votes
0answers
52 views

Calling Javascript Boolean variable value from visualforce page to apex controller

I have prevent submit method & one java script function. I write java script logic in java script function & call these function in prevent method. (Prevent Method) var SSN =document....
1
vote
1answer
47 views

How get a value from a Visualforce page and pass it controller before calling the controller.save method?

I'm having the following snippet in the VF page: <apex:inputField id="reason" value="{!case.reason}" required="true"/> which is displaying some case reasons for me. By calling the following ...
0
votes
1answer
31 views

How to access a dynamically generated html class name from a JS controller?

I was trying to concat a class name with index from the iteration component. If it's correct, how can I access this value from the JS controller? Component: <lightning:overlayLibrary aura:id="...
0
votes
0answers
55 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
21 views

is actionFunction or jQuery init function running first?

I am now responsible for a chunk of code that is big and old enough that no one is certain how it works. I have a few questions I'm hoping you can help with. I have a page called PolicyDetails.page ...
1
vote
2answers
32 views

Adding a new method to Controller of Lightning component resulting a constant error

Every time a new server-side method is added to existing component that has controller tag and it's successfully calling other methods in the same class, that component has an issue with recognizing ...
0
votes
1answer
64 views

unable to save record which is created through vf page

I have created vf page for new record creation of custom object. when i click to new button i am gettting vf page where based on case field value (i.e. CaseNumber) i am able to prepopulate other ...
0
votes
0answers
67 views

Dynamically created HTML : link onclick to Controller function

I'm creating some HTML elements in a helper function, and dynamically appending them to the DOM. There is no problem in this step. The only problem I can't solve is the creation of the onlick ...
0
votes
1answer
73 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 ...
0
votes
1answer
31 views

need help on writing test class for controller

i have controller for vf page, i have written a test class. test class is having two methods where i am succesfully able to run the test for Autocal but for Save method i am getting following error ...
1
vote
1answer
53 views

How to redirect to a record page?

I have a custom VF page in a section in the Lead layout. The page is showing a table with specific information. When I clink on the link I expected to see an account record page. The link is not a ...
0
votes
1answer
53 views

Want to use Html Rich Text in Vf Page

I created a html body in controller class of Visualforce page and want to show that table on vf page. To make that happen i used <apex:inputTextArea label="RichText" styleClass="slds-select" value="...
0
votes
1answer
43 views

Bulk upload in Lightning Component not working

we have a requirement where we need to upload contacts in bulk from lightning. We have set the maximum limit to 75k. But when we upload csv, it is considering a file of only 200-300. We need to upload ...
0
votes
1answer
25 views

How can I re-render a visualforce form to collect different fields?

Scenario I must Collect 40+ fields worth of information on an visualforce form. This must be broken up on multiple pages instead of one long page. Story So Far and Research The form dynamically ...
0
votes
1answer
26 views

Reference a controller function for a dynamically created DOM element

In my helper, I have a function that is dynamically creating multiple . I want the onclick event to trigger a controller function : I tried the following code : accordionWholeDiv.setAttribute('...
0
votes
0answers
21 views

how to conditionally render a gauge chart based on values of a numeric array in Visualforce

controller--snippet if(pos >=0 && pos <assTElist.size()){ lstTrans = [select Maturity_Assessment_Question_ID__r.Transformation_Element__c fa, ...
0
votes
2answers
86 views

can we use multiple extensions with custom controller

My first doubt is can we use multiple extensions with custom controller. If yes, please check below code and let me know can I call "dosomething" method of Ext2? Ext1: public with sharing class Ext1 ...
0
votes
2answers
42 views

Second apex method executing before the first one finishes

I have a vf page displaying several Multi select custom buttons. And I am calling a apex method every time one of the button is clicked from VF page using actionfunction. But if I click 2 buttons in ...