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
0answers
40 views

Add Child Records in JSON

I have a requirement to get Parent-child-grandchild-great grand child records in JSON. I could able to succesfully get Parent-child records in the JSON and the logic is as follows: public with sharing ...
-1
votes
1answer
21 views

I write code to hide and display a reason field using aura if when stagename is closed lost. It is not even calling controller. pls guide me

<aura:component implements="lightning:actionOverride,force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:...
0
votes
1answer
29 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
51 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
29 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
53 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;} ...
0
votes
0answers
25 views

Custom Controller OAuth Authentication

I am creating a custom controller for a SFCC Commerce Cloud store. Because I need to have communication with Third-party systems, I created a custom REST API controller to be able to receive some ...
0
votes
1answer
18 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
0answers
22 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
31 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
34 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
26 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
58 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
58 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
39 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
28 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
0answers
14 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
53 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
52 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
34 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
54 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
71 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
25 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 ...
0
votes
0answers
52 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
26 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
19 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
220 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
24 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
20 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
31 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
18 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
26 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
39 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
11 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
17 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
19 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
24 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 ...
0
votes
1answer
39 views

save failing due to WhoId when trying to make custom component work on Account object

I have this custom component built on Contact that creates a Task record. The goal is to modify these functionalities to also work on Lead and Account objects. Had no issues making it work fully on ...
0
votes
0answers
54 views

How to modify the CommunitiesSelfRegController to check if the contact exists in Salesforce?

I have a community portal where we want to allow external users to self register. As you might know, a controller called CommunitiesSelfRegController does this. The external users needs to give their ...
0
votes
1answer
36 views

Need to compare two list and remove item from first list if second list contains same item

I have a requirement where I need to remove Account from sObjectList as my tempSOjectList contains account. Below is my code when I try to use sObjectList.remove(s) it throws error incorrect signature....
0
votes
1answer
97 views

Error: Method does not exist or incorrect signature: void getRecord() from the type VFAccount

I am trying to create a custom controller and extension to create account records. But I am stuck with this error I am facing. I have tried many other tips to make this work and but no avail. This is ...
0
votes
2answers
63 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 ...
1
vote
1answer
29 views

Unknown Constructor error for extension controller

Hi im trying to use an extension controller for some kind of calculation in my vs page and getting error about the constructor: Unknown constructor... any help with that? code public with sharing ...
1
vote
1answer
39 views

No Save and Controller Extensions throw Unknown Property Errors

For clarity, and as I accepted an answer in the last question, I am posting a new question for additional help with new issues. The last question can be reviewed here. Here are my new issues: When ...
0
votes
2answers
101 views

Unknown Property Error on VF Main Extension

UPDATE 12/29/2020: For clarity, and as I accepted an answer here, I am posting a new question for additional help with new issues. The new question can be reviewed here. UPDATE: I am trying to switch ...
0
votes
1answer
27 views

How to add hasRecordId into my existing lightning component code?

I am pretty new to coding and need some help on how to add hasRecordId into my existing JS controller and Apex code. I need my Opportunity Id to automatically populate the recordId that the lightning ...
0
votes
2answers
34 views

My VF page didn't load correctly

My vf page doesn't load correctly. I have to create a button just to load the contents of it. can anyone check it for me? here's the code: VF PAGE: <apex:page controller="NightFlexList2Con&...
1
vote
0answers
53 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
2 3 4 5
27