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.

268 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
4answers
11k views

Uncaught TypeError: a.getAttribute is not a function

Scenario: I have a component that has an <aura:renderIf> within an <aura:iteration>. The <aura:iteration> references a component attribute called "selectedItems" to display ...
6
votes
0answers
628 views

“Variable not visible” error in production, but fine in development

My managed package works fine in development. When it runs from client orgs, as an installed managed package, this error occurs: "VisualForce Error Variable is not visible: [PackagePrefix....
5
votes
0answers
715 views

Visualforce Remoting: Javascript proxies were not generated for controller QuoteLayout: may not use public remoted methods inside an iframe

I've looked at all of these solutions here on SFDC stack exchange (1) (2) (3). I followed them for what applied to what I'm doing and I'm still getting this error. I made my apex class global ...
4
votes
1answer
2k views

Controller variables are not retrieving data from bound inputfields

I'm working on an interface that allows users to create activities directly from a list of records of a custom object, so I created a wrapper class that contains said object and a task, in order to ...
4
votes
2answers
204 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: ...
3
votes
0answers
133 views

Case standard list controller won't show any records on visualforce page

I am new to Visualforce, and for the life of me I can't get a case standard list controller to show cases. It works for Accounts and Contacts, just not cases. Here is the code: <apex:page ...
3
votes
0answers
461 views

Global window object in lightning helper

After getting an answer to Preserve a JavaScript variable between component calls of the client-side code question (which says there is a separate wrapper object around the browser's window object for ...
3
votes
0answers
313 views

Save & New Button for Visualforce page with data on lookup

public class ProductController { ApexPages.standardController m_sc = null; public ProductController(ApexPages.StandardController sc) { m_sc = sc; } public Pagereference ...
3
votes
0answers
252 views

passing html passthrough from apex to selectoptions

I'm trying to pass through some additional information via the html- passthrough on apex:selectoptions from the controller. Ie I need it to output: <apex:selectOption html-data-range="h" ...
3
votes
0answers
306 views

Internal Server Error in Partner communities when using extension controller

We have a appexchange app in which there is a global class. We are using this global class as controller in local VF page and also created a extension class. When i try to use the variable declared ...
2
votes
0answers
299 views

what is “quickcard” in salesforce?

Use the quickcard (section “Import an Object”) to require ISML and guard in your controller. i can't find quickcard keyword in eclipse and what is meaning of quickcard in ecplise . The first bold ...
2
votes
0answers
491 views

How to dynamically query in Remote Object Model?

See my code comments in my controller for what I'm trying to do. This article might help as well: Overriding Default Remote Objects Operations Page <apex:page> <apex:remoteObjects &...
2
votes
0answers
71 views

Can't pass JS parameters from VisuarlForce to Controller

I'm trying to pass 2 parameters from a VF page to a controller in order to reRender a pageBlockSection. Markup <apex:form> <apex:actionFunction action="{!setParameters}" ...
2
votes
0answers
1k views

How to use a javascript function from an external script in lightning controller?

I want to load a function from external script and then use it in the component controller: example of a function that i tried to call from the component controller (from the Init method specifically)...
2
votes
0answers
553 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 ...
2
votes
1answer
86 views

Why am I exceeding viewstate when using button+actionfunction, compared to using commandButton?

I have a very simple page: <!-- vf page --> <apex:page standardController="Challenge__c" extensions="upsertChallengeResponse" sidebar="false" tabstyle="ChallengesVF__tab" ...
2
votes
0answers
83 views

Custom Controller that mimics standard controller

I want to use a visualforce page as a Global Action but according to documentation I need to create a custom controller. I am not doing anything outside of the standard controller so I am wondering if ...
2
votes
0answers
280 views

Passing object id to a flow using a custom controller

I'm a clicks not code guy building a custom controller based on some code I found in the web. The controller is to be part of a visualforce page that launches when a button on the contact page is ...
1
vote
0answers
42 views

First error: No content to map to Object due to end of input

Below is my batch class which gets data from external systeglobal class LogClass implements Database.Batchable<Integer>,Database.AllowsCallouts, Database.Stateful { global Iterable<Integer&...
1
vote
0answers
26 views

Pass value to apex controller using apex action support

Im trying to pass values to apex controller from vf page but values are not passing. could you guys please check where im going wrong. VF PAGE <apex:repeat value="{!am.names}" var="n&...
1
vote
0answers
46 views

pageReference behaves differently in classic and lightning

I have a VF page with a button. When the button is clicked, I would like a new tab to be open for the defined URL. At the same time, I would like the original VF page to remain at its original state. ...
1
vote
2answers
61 views

Help with SOQL grouping

I have a requirement where I need to display top records from an object instead of all that meets the criteria. Below is my SOQL SELECT CustomAccount__r.Name, CustomAccount__r.Country__c, Month__c, ...
1
vote
0answers
106 views

Duplicate Rule Bypass with RecordEditForm in Lightning

I am struggling with figuring out how to pass dml.DuplicateRuleHeader.allowSave = true; in Apex on a Lightning RecordEditForm component. I am using RecordEditForm as a record creation form and ...
1
vote
0answers
22 views

Initials Profile Picture

I am trying create a function to display the initials of the person (not the current user) if they don't have a profile picture. I have all the initials stored in a list in my page controller. Can ...
1
vote
1answer
1k views

Change the case status through Omni-Channel on accept event

I am using Omnichannel for acceptance of the case. The requirement is that when an Agent accepts a case, the case status should be updated to 'In Review'. I have created the trigger on the AgentWork ...
1
vote
1answer
82 views

4 Level Picklist Dependency

I'm trying to set up 4 picklist that are dependent on each other. The idea is this: There are 4 different picklist. Pick1, Pick2, Pick3, Pick4 Pick2 is dependent on Pick1. Pick3 isn't necessarily ...
1
vote
0answers
8 views

action failed:c: newasset_component$controller$doLibloaded['lightningUtilsLib' is undefined]

I have a strange error when i try to search for client in the global search. error action failed:c: newasset_component$controller$doLibloaded['lightningUtilsLib' is undefined] Some help? Thank you
1
vote
0answers
124 views

Full Handlebars Markup Language in Lightning email templates?

Is it possible to use full Handlebars Markup Language (like Handlebars helpers, #each, #lookup, and callbacks to controllers) in Lightning email templates? I want to create an email template for use ...
1
vote
1answer
63 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 ...
1
vote
1answer
852 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 ...
1
vote
0answers
691 views

Getting parent Id when clicking new button from related list

Object A is the parent object and object B is child object. object B has new button override with VF page. when I am clicking the new button of obj B from related list A I need Obj A's Id. For this I ...
1
vote
0answers
66 views

It take some time for the method in Apex to become visible for the lightning component. What is a workaround here?

It take some time for the method in Apex to become visible for the lightning component. What is a workaround here? I mean literally: I create an Apex controller, create a method in it, then I create ...
1
vote
1answer
316 views

How to display value entered in apex:inputText as numbers with commas - currency format

I am using apex:inputText that holds a string with number(Integer) at controller side. Is there any way to display it as Number with commas (in USD Currency format)after typing input.
1
vote
0answers
455 views

Pass list of selected SObject records to Remoteaction method

I have below code where I am trying to pass a List of Accounts to Remoteaction method from a VF Page. I am able to pass one as below, but can't figure out for a list of Accounts. Can someone please ...
1
vote
0answers
2k views

Unknown Controller Action

I am trying to create a lightning component, but I get Unknown controller action 'getContacts' error when trying to load the page. What is the main reason I get that error? Server-side Controller: ...
1
vote
1answer
848 views

Array or List of Big Objects as parameter for AuraEnabled controller

Does Salesforce support passing an array or list of big objects as a parameter for an AuraEnabled controller method? In other words can I pass from a lightning component javascript controller an array ...
1
vote
0answers
34 views

Embed merged URL in a document from Salesforce Apex

I am working on an Apex Controller which generates a word document. I need to insert a merged URL in the word document depending on the Account that is selected. For ex, if the Account is google, the ...
1
vote
0answers
467 views

Send a base64 image in apex email

I'm trying to send an email using apex Messaging class using the function sendEmail(messages). Its working fine and I received the mail correctly now the problem is with the image part. If I tried ...
1
vote
0answers
798 views

Apex controller action not accessible - “Unknown controller action 'getLeadSourceOptions'”

I'm up against a wall with this one. I've scrubbed my code 20+ times and I'm not seeing what I'm missing. According to the error, it sounds like the helper in the extended component is calling the ...
1
vote
1answer
85 views

Content cannot be displayed: pba__Bedrooms_pb__c does not belong to SObject type pba__Listing__c

I have the following controller and VF page. The code seems to be fine as I don't get any error but when I include the VF page in to an object I get this error: Content cannot be displayed: ...
1
vote
0answers
95 views

Add existing attachment in visualforce Email template via workflow

I have a scenario that when billing is generated in system. Invoice should be send through mail to Person Account Email. I am doing this via workflow. In workflow I have a VF email template which ...
1
vote
0answers
145 views

Refresh an iframe from another iframe

I have two inline VF pages added in the standard detail page layout. Both are inter-dependent and used for API callouts and has data from a custom object used for storing API reponse. Is it possible ...
1
vote
0answers
116 views

Rerender causes getter to get called even when it should not

Can anyone explain to me why my list is getting re-populated even when it shouldn't? As you can see in the code, the ActionFunction is inside an ActionRegion and only reRenders an outputPanel with Id ...
1
vote
0answers
20 views

Not getting the value of File and metadata

This is my vf Page and I am not getting the value of file and metadata in Controller. This is my Vf page <apex:page docType="HTML-5.0" controller="AdminPannelController"> <apex:...
1
vote
2answers
320 views

unable to instantiate flow in controller

I'm trying to set the finish location of a flow to the record created in that flow. I've tried setting up the controller a million different ways, but I keep getting an invalid page redirection error ...
1
vote
0answers
99 views

Visualforce component field value bind issue

I have following class /** * extension class for handling VF page actions */ global with sharing class SQX_Extension_Random_object extends SQX_Controller_Sign_Off { private ...
1
vote
0answers
74 views

Building a visualforce service cloud console component that displays user data and works on any object

Background: We use cases internally to manage sfdc requests. I'm testing out service cloud now that its included in nonprofit lightning edition. I have built a simple visualforce page using user ...
1
vote
0answers
527 views

Subscript is invalid because list is empty: In Trigger

I implemented one trigger in Parent object.I am getting the following error while creating child record. Error: Invalid Data. Review all error messages below to correct your data. Apex trigger ...
1
vote
1answer
137 views

Test class List Exception: Controller cannot find test data

I'm testing a class as a community user. Here is the issue. my debugs show that running user is set. My User query returns a user with a contactid but for some strange reason the contact query is ...
1
vote
0answers
167 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 ...

1
2 3 4 5 6