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
1answer
32 views

I didn't see my opportunity in visualforce page

I modified my class with :ApexPages.currentPage().getParameters().get('Id') When I launch my Visualforce page i didn't see records. What i need to see: What i see: When I put my Id, OpportunityId ...
1
vote
1answer
45 views

Switching from @remoteaction to actionFunction due to "Visualforce Remoting Exception: Input too long" error

In very few words, I am hitting some sort of limit with a visualforce remote action, as I get the following error: Visualforce Remoting Exception: Input too long I reached out to Salesforce support, ...
1
vote
1answer
42 views

How Do I Override the Standard Controller's Save Action in My Controller Extension?

I am trying to build a controller extension for the Opportunity standard controller. According to documentation and stackexchange I ought to be able to override the Save() action in the controller ...
0
votes
0answers
22 views

Visualforce Email Template Help with Conditional Rendering Datatables

I have a component I am trying to display within a Visualforce Email Template. Essentially I need to display 1 of 4 possible outcomes within a datatable depending on if the data were to be returned in ...
0
votes
0answers
21 views

Navigate to a link with apex:command button

I have a <a></a> which downloads the document from salesforce(https://<salesforce_baseurl>/servlet/servlet.FileDownload?file='+ doc.Id). Below is the code for anchor tag. <a href=...
0
votes
1answer
24 views

VF Page not retrieving to the original state after Page refresh

I have a VF page that gets disabled with the click of a button. I want the button 1 it to get enabled back after doing the refresh (browser refresh). Below is my VF page and its controller: <apex:...
0
votes
1answer
28 views

Fetching User Info in Lightning Component

I'm trying to create a Lightning Component to integrate Sendbird into Salesforce by following this guide: https://sendbird.com/developer/tutorials/how-to-integrate-sendbird-with-salesforce I've ...
1
vote
0answers
26 views

Action.setCallback not being executed event tabclosed lightning component

I have an issue where in my action.setCallBack is not being run. When user closes the tab, the component call a function onTabClosed. onTabClosed : function(component, event, helper) { var aCaseId ...
0
votes
1answer
66 views

Query apex controller Where into a string

I am not a developer but I am trying to modify this controller that is available in a component I installed via app exchange. For what i understood the code is just converting this query into a string ...
0
votes
0answers
44 views

I cant able add the map of values into other map when keys are not same

I have - Map<String,Wrapper> mapWrapFloating = new Map<String,Wrapper>(); Map<String,Wrapper> mapWrapFloatingOppLineItems = new Map<String,Wrapper>(); that contains different ...
0
votes
1answer
29 views

Lightning component working alone but not working inside another component

I've created a component to update "Observations__c" value in Account Object. It is working fine, but I need to call it inside another component. But inside another component, it isn't ...
0
votes
1answer
93 views

If I click the button in the Aura Component, I want to go to the Url I want

JS Controller onconfirm : function(component, event) { var windowHref = window.location.href; var url = new URL(windowHref); var recordId = url.searchParams.get("...
0
votes
1answer
151 views

Join multiple JSON strings in Apex

I have a requirement to display Accounts-->child Accounts-->Tasks-->Child Tasks in the JSON. Here is my Apex code: List<Account> accountRecordsList = new list<Account>(); List<...
0
votes
1answer
59 views

(Case)controller.getRecord(); - Returning Null in the visualforce page [closed]

I'm trying to get the record that starts a visualforce page but it's returning null. Can anyone point out the problem to me? Visualforce: <apex:page standardController="Case" extensions=&...
0
votes
1answer
38 views

Create record from ModalBox in Community cloud using Aura Component

I have created an Aura component in Community that display a ModalBox allowing to create a record in Salesforce when submitting the info from the modalBox. The problem I have is that when the record ...
0
votes
1answer
57 views

Issue with Sub-query levels in SOQL

I have a requirement to fetch Parent, Child, and Grandchild and Store them as JSON in the same hierarchy. Here is my logic: public List<Parent_Project__c> ProjectRecordsList {get; set;} ...
0
votes
1answer
64 views

Plural Label of Managed Package Object

I have an Object which is deployed using Managed Package in my Org. Here is the object (Name Changed): API name of the custom object is res__Accs__c. Now when I tried to get the plural lable of the ...
0
votes
1answer
60 views

Passing values from Controller to VF Page

I have a requirement to display Account and its child Accounts using Gantt Chart. Here is my Logic: Controller: public with Sharing class Account_Gantt { public Account ParentRecord{get; set;} ...
1
vote
1answer
47 views

Add Child Tasks dynamically in VF page created using DHTMLX Gantt Chart

I have a requirement to show Projects and its related sub tasks using Gantt chart in Salesforce. I have used DHTMLX as my base source. Here is my logic: <apex:page standardController="...
1
vote
1answer
64 views

Commerce Cloud Controller Authentication

I did a controller inside commerce cloud in order to update the order from the external Order Management Service. Then controller inside the Commerce Cloud will receive the order details by a POST ...
0
votes
2answers
346 views

Apex Error: Illegal assignment from List<String> to String

I have a requirement to fetch Contact Region from Contact and update the same on User. Here is my logic: list<user> user = [SELECT name,Region__c from User where isactive = true]; Set<...
1
vote
1answer
36 views

Display Custom text in VF Page when field value is null

I have a Gantt Chart which is used to show the Project Timeline. I am using Google Charts to display the Gantt Chart. Below is the VF page: <apex:page standardController="Project__c"> ...
0
votes
1answer
31 views

Cannot get value back in VF page from the controller [closed]

I'm using the code below but I'm not able to get value in controller and also makes blank what I entered in VF page. please check if this code needs correction: VF Page: <apex:InputText label="...
0
votes
0answers
296 views

System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, [LinkedEntityId]

I have hosted a VF page on site. As a site user we use the form to fill the lead details. In this form we also have a option to upload a file. I'm able to create the lead record, & the file gets ...
0
votes
1answer
61 views

Fetch only one child record of a parent in soql

I have a requirement to fetch Timecard records that are related to a Project. Below is my query: List <Timecard__c> timecard = [ SELECT ID,Project__c,resource_name__c FROM Timecard__c ...
-1
votes
1answer
43 views

Error while fetching Record values in Apex

I have a requirement to get all sponsor ids from Process record and store it on User record as multi-select picklist values. below is my logic: list<user> user = [SELECT ID from User where name =...
1
vote
0answers
24 views

Display picklist values after they have been submitted

I have a Close Case tab with two picklists when performing a close-case action, I'm able to save the values to database. But if I revisit the Close Case tab I just get the default values, is there any ...
0
votes
1answer
53 views

Get Child field values in Parent

Below is my Object Schema: Parent: User Child: Contact Grand-Child: Sponsor. Sponsor Holds a field called ProId. These as 16 digit Ids. Now, my requirement is to get all the ProIds from the sponsor ...
0
votes
1answer
28 views

Call site genesis pipeline inside site genesis controller version

I am converting a pipeline into a site genesis controller version in sfcc b2c. But unfortunately, that pipeline has multiple pipelines inside it. and there are also multiple pipelines are being used ...
0
votes
2answers
81 views

Help with SOQL inner and outer queries

I have a requirement to find total number of parent records which are not associated to any child records. Now these two parent and child records are from single object called Project__c. To achieve ...
0
votes
2answers
271 views

How to pass record details dynamically to apex class

Objective: To display the URL of VF page as a link on the record detail page and when clicked on that, the VF page should open in a separate tab by taking the record values, such as name dynamically. ...
0
votes
0answers
40 views

How to use VF page in Einstein Analytics

I know this might sound complex but is there any way that we can embed Visualforce page in Einstein Analytics. We have built a custom Gantt chart using visualforce page as it is not possible in ...
0
votes
1answer
68 views

How To add new Contact To existing Account?

Created A component to Create a New Contact And Added it to Account Page layout. now i want to Connect That new contact to Account in which we have. Apex public class CreateContact_Ctrl { @AuraEnabled ...
0
votes
1answer
85 views

want to navigate to detail page

Hi yal i am New on salesforce want to navigate to a contact Detail page through Button.How to pass parameter ? How can i do please help. Apex Class:- public class ShowContactInCard { @AuraEnabled ...
0
votes
0answers
33 views

Unable to pass parameter to apex controller via JS

I already had a working apex function with various string parameters that I pass via the JS helper. I just added a new String parameter "reasonPick" to the apex function however when I try ...
1
vote
0answers
164 views

Custom field are not displayed in the Lwc

I'm trying to pass a list of assets to the lwc from the controller but when reviewing the data, only the values of the standard fields are arriving, the custom fields do not appear This is my ...
0
votes
1answer
64 views

Visualforce rendered if list is empty

I'd like to render a VF component if a list is empty, but the VF page is giving an error of "Unknown property 'CheckOpps.opportunity'. How to correct this error? I am building the list in a ...
0
votes
1answer
48 views

Fire 2 events at a time

I'd like to fire 2 events at a time but it only executes the first .fire() method. I've got 2 events for showing and hiding of multiple lightning components. Can anyone suggest if how can I implement ...
1
vote
1answer
745 views

common.apex.runtime.impl.ExecutionException: Invalid id: [] How to remove [] parenthesis when LWC sends List of Ids to controller class method?

I have created Custom List Button on Case object. That button calls VF page and then VF page calls LWC which updates the record. Once Record is updated I want to navigate back to Current List View. I ...
0
votes
0answers
47 views

How to Navigate to Custom List View after updating multiple records from List View?

Requirement: On Case Object Custom List View(Queue), we have Accept button. When I Click on Accept Button, it transfer Record Ownership to Current User and it stays on the same list view similarly I ...
0
votes
1answer
33 views

Need to get value for reference field instead of ID's

Below is my code where I am describing all the fields of selected object. Instead of fetching ID for reference fields I need to fetch values for example I in case of account Id I want to fetch account ...
0
votes
2answers
33 views

Need to change field label of ID

I have a requirement where I am fetching fields of SObject and displaying them on UI. I want to change the label of ID to ID(Master Record). Please help me how to do it. Below I'm attaching my UI snip ...
0
votes
0answers
23 views

Prevent automatic field update on a record when related record is update

I have created a button on Community allowing a client to subscribe or unsubscribe to an article in our client portal. When the client clicks subscribe A record is created in Salesforce in my custom ...
0
votes
2answers
31 views

Problems with building a custom controller in Salesforce

This is my first time having built a custom controller, and I in a revolving door of errors: This is the code with which I begin, and this DOES work: apex: <apex:page controller="...
0
votes
0answers
94 views

Update records using input data in aura

I have an aura component with records <section class="slds-card__body"> <div id="list" class="row"> <table class="slds-table slds-...
0
votes
0answers
20 views

Service Console Tab label showing “Loading…” i VFP launch from button

I have a visualforce page that is launched from a button on in a service console app. The page is rendered as a pdf and opens in a new tab, but that new tab forever stays as loading, confusing end ...
0
votes
1answer
20 views

Problem with aura and JS controller

I have a little problem. I have a simple program that gets a value from picklist , and using this value my program must show all values from the database Thats my code COMPONENT <aura:attribute ...
0
votes
1answer
30 views

Roll up field not displaying whole numbers in Custom Controller

I have a rollup field on the Quote object. When I access that value in my VF page controller, I'm seeing its value getting truncated there. Because of this when I'm seeing less amount on my VF page. ...
0
votes
0answers
30 views

How to get data of each row in apex:repeat to pass them to controller

I am trying to build a sell sheet which comes in two VF pages. In the first page the products will be displayed based on the category selected. The products are shown in an apex:repeat. There is a ...

1
2 3 4 5
27