Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Property type misidentification in VisualForce Page

I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process. There were a few deploy errors but I've fixed all but two types. This is one ...
1 vote
1 answer
1k 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
0 answers
11 views

Integer and List<case> from Apex Class are not shown in Aura Component

I've tried everything, I've checked all the questions and answers, but I can't see the error. Can you please tell me why the numbers and cases are not displayed? System logs are output and it feels ...
0 votes
2 answers
1k views

Check if current record value present in other records

I have a requirement, where account name and account number if do not match with any other records, a custom field called alert_text__c will be updated with some text. It is as follows: List<...
0 votes
2 answers
1k views

apex outputtext value not being displayed

I have one vf page where in I am bringing value from controller and displaying on vf page using <apex:outputText>.But it is displaying nothing on the page.I have checked even the debug in that ...
0 votes
2 answers
1k views

Autorefresh or reload of the Account page

I have 1 visualforce page, which opens up on clicking a button on Account Detail page. I am filling up few field information of Account in the visualforce page and want to get those updated in ...
0 votes
1 answer
1k 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
1 answer
2k views

How to check live agent availability from apex?

I've been using JavaScript to check live agents availability for a while now and it was working fine until a recent change of requirements. This is what I currently do: if (!window._laq) { window....
0 votes
1 answer
819 views

How to always call aura:handler init regardless of how many times a certain component is called

I have a code that calls specific components upon clicking links. These components have init functions that checks certain field values. I'd like to know how many times an init function is called ...
1 vote
1 answer
1k 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 ...
0 votes
1 answer
2k views

How to get selected pick list values with Apex for Aura Component

I have established a custom field called "Products Used" on the account object with a variety of banking products to choose from. I am trying to program an Apex controller to query the selected ...
0 votes
3 answers
2k views

LWC - How to expand only clicked value on a table

I have a table of values of a custom object, like this : When I click the first line (Value1, Value 11 or Value 111) I want to expand ONLY the first line to show values related to this line that are ...
9 votes
4 answers
19k 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 ...
0 votes
0 answers
30 views

Loops are not handled in a Business Manage template

I'm creating a module for Business Manager, but when I render the template and try to use pdict to loop it, it works for the first loop, but only one loop per render. If there is more than 1 loop in ...
0 votes
0 answers
52 views

I am getting error because of the trigger event

I have a trigger which will call an handler trigger ASNSeasonalAllocationTrigger on ASN_POS_Item__c (after update) { FetzerCalculateTotalAllocatedForAUser.calculateQuantityReceived(Trigger.oldMap,...
0 votes
1 answer
31 views

Render Error Message on VisualForce page with output panel

I want to be able to render an error message on the page if a case record variable Closed_Days_Beyond_30_Days__c is true but unsure how to make this work. If the boolean is true, set the error message....
5 votes
2 answers
162 views

How to preserve string with newlines passing from LWC to VF controller for PDF rendering

I have a Lightning Web Component (LWC) which takes a text input from the user. The text input is entered via a lightning-textarea, i.e. can also contain text with newlines. The LWC contains an iframe ...
0 votes
0 answers
34 views

How to use the List<Account> value created in ApexClass in Visualforce Page

My Apex Class is like this. public with sharing class displayWarning { ApexPages.StandardController controller; public displayWarning (ApexPages.StandardController controller) { this....
0 votes
0 answers
34 views

Trying to show FullPhotoURL on a visualforce table

On our org we're capturing a referral person (Referral_Person_Opp__c) on the Opportunity Object - this field is a look up on the User Object. I have created a simple table to show the top 5 referral ...
1 vote
0 answers
83 views

Site.createPortalUser is unable to assign a profileId

public with sharing class RegisterModalController { public class CustomException extends Exception {} @AuraEnabled public static void register(String username, String password, ...
0 votes
0 answers
25 views

Value set from JS controller does not reflect on CMP file

I am working on a functionality that hides a button and uses a wrapper for assigning a value (ex. wrapperClass.showButton = false). I checked the Apex debug and it is setting the wrapperClass....
2 votes
1 answer
2k views

Display a list, make an edit and then save

it sounds so simple, get a list of similar items and allow the user to edit one field, then click save and return to where you came from. I just do not understand enough to make this happen, can some ...
0 votes
1 answer
124 views

Unable to find action on Lightning Component

This is my code but I have the Error // DynamicRelatedContactListController.apxc public with sharing class DynamicRelatedContactListController { @AuraEnabled public static List<Contact> ...
1 vote
1 answer
303 views

LWC - How to make refreshApex work with public property passing from parent

Is there any way to use refreshApex to refresh data passing from Parent to Child? I have 2 components: Parent & Child. The parent will perform logic to make the data clean then pass to Child (list ...
0 votes
0 answers
191 views

Getting Error 'An internal server error has occurred' while passing invoice template html data from LWC to Visualforce Page to render as PDF

Html Code : <div class="invoice_container" style="width: 100%; max-width: 900px; margin: 0 auto; padding: 20px; font-family: Arial, sans-serif; color: #333; background-...
0 votes
0 answers
449 views

Salesforce LWC Worklog Timesheet add weekly hours problem

the purpose of the worklog creation code is to assign a project-based weekly assignment to the user and enter the daily working hours. Users need to be able to edit it and assign project-based ...
0 votes
1 answer
551 views

Embedding a CRM Analytics Dashboard in Aura Component Filter doesn't work!

I am trying to filter a dashboard using an aura component, my dashboard works fine but filtering doesn't work. I get this error: Unexpected non-whitespace character after JSON at position 1 The ...
0 votes
1 answer
980 views

Site Guest User can not send email in force.com site in salesforce

I have already searched it through what could be the possible reason for not being able to send a single email as a site guest user on force.com site in salesforce Site guest user's email should be ...
0 votes
0 answers
47 views

Record twice update alternative

I have this method in a controller class that updates the product on a custom object (Contract Modification) based on what the user selects in the UI. In this object i have a Section 'Validations' ...
109 votes
11 answers
42k views

How do I start to debug my own Apex code?

Sometimes questions are posted here that would best be answered by helping the questioner learn how to do their own debugging. (Remember that proverb?) I'd like to have something to link to on this ...
1 vote
1 answer
23 views

Can two select use use the same value?

I'm trying to synchronize two selectList together using the following : <apex:selectList value="{!selectedOption}" size="1" onchange="myFunction()"> <apex:...
0 votes
1 answer
53 views

need help accessing the returned value from controller to aura component`s helper class

var action = component.get("c.getCheckType"); action.setParams({"recordId": recordId}); I am trying to call a funtion from Helper class of an Aura controller to apex controller ...
-1 votes
1 answer
163 views

Dictates what happens when a user 'goes back' (via browser button) from a Visualforce app

I have a visualforce app that takes an input and then displays a table of information from that input (via an external call in a connected controller). There is an issue where if a user tries to use ...
0 votes
1 answer
132 views

Apex Test - setSelected() is empty!

Hi I'm having an issue with a non-static test method which is passed a list of records from the standardSetController. I've called setSelected() and an instance of the non-static method but when I'm ...
1 vote
1 answer
347 views

Create multiple delete functionality for all the attachments related to a particular case

I have created a button on case detail page called "delete attachments" once pressing that, the page directs to below VF page where all related attachments to that particular case are displayed with ...
1 vote
1 answer
271 views

Gack Error Id : 2020409769-104966 (551437190) when there is no constructor without parameters

When a Lightning Action is called from LWC and a DTO model instance is passed, where the corresponding DTO Model class doesn't have no arguments constructor, an internal error is shown: Gack Error Id ...
0 votes
1 answer
6k views

How to display Task WhatId related field on Lightning Page

Apex Controller: public without sharing class DTask { @AuraEnabled public static List<Task> getTaskList(){ Id userId = UserInfo.getUserId(); User loggedInUser = [Select ...
-2 votes
1 answer
55 views

How to write test class for this? [duplicate]

public with sharing class ToggleController { @AuraEnabled(cacheable=true) public static List< Contact > fetchContact (Id accId, String status) { return [SELECT Status_c, ...
0 votes
0 answers
31 views

VF controller not maintaining instance variable value

public without sharing class PaymentSuccessController { public Boolean emailSent = false; private List<String> rlis; public List<String> getReceiptLineItems() { if (...
-1 votes
2 answers
51 views

How to combine these method into one?

public with sharing class bot{ @AuraEnabled(cacheable=true) public static List< Contact > fetchActive (Id accId) { return [SELECT Status_c, FirstName, LastName, Email FROM Contact WHERE ...
-1 votes
1 answer
145 views

Lightning Table Not Display Data

I've been wracking my head the whole day at this, I'm very new to Salesforce and trying to create a Lightning Component that displays Contacts and what Commission they've earned. I'm just not getting ...
1 vote
1 answer
137 views

Change the apex:commandButton value from 'Return to Uploader' to 'Done' from Javascript (Jquery)

I have a requirement to change the value of apex:commandButton from 'return to uploader' to 'Done' using Javascript(Jquery). Below is my VF Page code: <apex:commandButton style="float: right;&...
0 votes
1 answer
47 views

Issue while passing inputfield value from vf to custom controller

I have a VF page through which upon selection it is creating an Agreement record. As per the current implementation record is created successfully but inputfield value is not getting passed to the ...
1 vote
1 answer
363 views

"Failed to parse CONTROLLER for FaceMesh in Aura component"

I am trying to use the FaceMesh object from the MediaPipe library to detect and track faces in a video stream in my Aura component. However, I am getting an error when I try to save my component that ...
1 vote
1 answer
73 views

Unknown Property Error "Create Apex Property" when creating Visual Forcepage

I am attempting to save a Visual Force page that is accepting input values from a flow and passing them into an invocable method. It keeps saying the custom object I'm using in the invocable method is ...
0 votes
1 answer
241 views

Unknown Property Error using Custom Controller When Trying to Save Visualforce Page Pointing to a Controller

I am using an invocable method along with a controller to feed a list of records being returned from the flow and invocable method, into a VF Page in order to render multiple records with the field ...
1 vote
3 answers
1k views

Divide a string using Apex Trigger

I have a trigger which inserts merged record under a custom object called Account_merged__c. The trigger is as follows: trigger AccountMergeTrigger on Account (after delete) { List<...
-1 votes
1 answer
67 views

Visualforce Page: Group by Company and Consecutive Date Ranges

I have created a Visualforce Page .pdf to output Candidates and their previous Work Experiences. On the Work Experience records there is a lookup field for Company as well as fields for Title, Start ...
0 votes
1 answer
59 views

SFRA - Cartridge for payment methods returning an empty list

I'm currently exploring how to extend Salesforce's API. I currently have a Controller that tries to retrieve the payment methods available. The problem is that it's returning an empty list. There are ...
0 votes
2 answers
307 views

Unable to pass parameters to visualforce page - Error "Value provided is invalid for action parameter 'templateId' of type 'Id'"

I have a visualforce page that I'm using to redirect a user to a second and final visualforce page in an attempt to bypass a CSRF Token request (it's from a managed package). I can't seem to get the ...

1
2 3 4 5
28