Questions tagged [wrapper-class]

Used for organizing data to be 'Wrapped'. Typically allows for better manipulation or sorting of data.

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

LWC - Javascript object is not reactive with Wrapper class object

Could you please guide me how to make the wrapper class object reactive in LWC js. I believe that @track properties are reactive but when I change the value of any property in this.coreAttributes js ...
0
votes
2answers
45 views

How can I assign field values from an Object instance dynamically via a predefined wrapping?

I have a Wrapper object that I'm using to store values via calculations and callouts. I want to map these values to a custom object's fields. I also have a custom metadata type where I'm storing the ...
1
vote
1answer
23 views

Display Leads and Accounts in same <apex:panelGrid>

In my controller I query for leads and accounts to display them in a googlemap and also in a panelGrid: However what I fail to achieve is to display the leads and accounts in the same panelGroup and ...
0
votes
0answers
17 views

JSON Wrapper with APEX: prepping for Salesforce Dev 1 cert

I'm studying up for my exam and found this code sample. It's syntax is unclear to me. mainly the .class and the getter and setter. I noticed that I can take any prop from the serialized object and ...
-1
votes
1answer
38 views

Wrapper Class in Apex

Can anyone please help me what wrong in the below code. I'm getting. Illegal assignment from List to List in aWraper.items = spwrap; this line. @AuraEnabled (cacheable = true) public static List&...
0
votes
1answer
18 views

How to fetch opportunity fields on a nested query included process instance and steps and work items

I've been struggling for quite some time now to figure out a way to provide the approvers within my company with a list of opportunities that are pending approval and by whom (we have two parallel ...
0
votes
1answer
177 views

LWC Lightning Datatable Search

I am trying to build a lighting web component which uses lightning datatable with Server side search capabilities. here is the code: I am not sure what I am doing wrong. .HTML <template> ...
-1
votes
1answer
30 views

What is a wrapper class in LWC?

I understand that wrapper class is like a custom object that you can define in an Apex class but I am not sure why getter setter methods are used for each field in a wrapper class. Can anyone please ...
0
votes
0answers
26 views

Apex Rest API response does not fetch fields with null values [duplicate]

I have created an apex api with a SOQL query to get opportunity, its related contact, account , line items and payment based on an ID. The API response does not get the fields for which the value is ...
0
votes
2answers
60 views

How to check for null values for all variables of a custom apex wrapper?

I have a wrapper class written in following manner class Wrapper{ String name {get;set;} Integer age {get;set;} EduWrap edu {get;set;} public String returnTest(){ return '...
0
votes
1answer
42 views

How to jenerate JSON format using wrapper class?

Please see the below code I have done some modification, @RestResource(urlMapping='/instructionsRestCall/*') global with sharing class InstructionsRestService { @HttpGet global static List ...
0
votes
1answer
42 views

Wrapper class and displaying data in table lightning

Need your help in structuring my wrapper class. Price agreement Header (Parent): Has 3 child.Distributor object : Distributor_Eligibility__c ,Product :Product_Pricing__c,Enduser object ...
0
votes
1answer
22 views

Get contacts created by lead conversion

I was stuck at a point where I need to get the contacts created by lead conversion. Can someone tell me how to query those contacts when a lead is converted... I am new to salesforce so please help me ...
0
votes
1answer
26 views

I am getting null pointer exception because not able to initialize List

I am getting null pointer exception when adding referral data in List. I am not getting how to initialize List inside Messages class. public class JSON2Apex { public class Messages { ...
0
votes
1answer
70 views

Wrapper Class Error on Account Hierarchy

I have created one VF page which is on Account object to show the Account Hierarchy at the parent level. Basically this VF page will show Contracts of all child Accounts on parent account. I have ...
0
votes
1answer
42 views

How to call an Apex method with Wrappers parameters from managed package?

I know, how to access to such a method: packageName.MyGlobalClass.doWork(); But what if our method gets a Wrapers parameters? Like this: global with sharing class MyGlobalClass{ global ...
0
votes
1answer
30 views

Can someone tell me what is the meaning for below code snippet

Can someone explain to me what is happening with the below code snippet //Creating New Contact Record public void createNewContact() { wrapperList = createNewContact(wrapperList); } ...
1
vote
1answer
33 views

Test coverage for wrapper class which takes user input

In wrapper class, there is a boolean variable named isSelected which I need to make true to increase coverage of a method. The constructor of the class always initializes the value to false. I am not ...
4
votes
2answers
167 views

How to adding dynamic rows/fields to wrapper class?

I have written the following WrapperClass, consisting different object records/rows/fields as members. How can I dynamically update this wrapper class object. In below code i have used only two fields ...
0
votes
1answer
103 views

Checkbox selection uisng Wrapper is not passed to controller

This might have been posted several times but i'm unable to workaround this issue using apex & I also looked at all the existing questions similar to this. I have a list of Opps with checkboxes in ...
0
votes
1answer
29 views

Retrieving values from an inner class with dot notation

I have a JSON payload I'm processing from a REST API web service in Salesforce. I converted the JSON to a DTO object in APEX with the following: WorkOrderDTO Class global class WorkOrderDTO extends ...
0
votes
0answers
34 views

Structure of visualforce page using standard controller, extension and wrapper of data?

I am creating a component to add to a contact record that shows aggregated note data from two different sources. Page <apex:page id="AggergatedNotes" standardController="Contact" ...
2
votes
1answer
75 views

Access the List<String> in wrapper class to LWC

I have a wrapper class in my apex controller. global without sharing class Homepage_Ctrl { public static List<variableDTO> dtoList = new List<variableDTO>(); public static ...
0
votes
1answer
30 views

Can't find wrapper class definition

I am modifying inherited code in the apex controller. There is a WrapperJobs object that is returned. However, I cannot find the object definition anywhere. Can you point me to where it could be. ...
1
vote
1answer
670 views

Custom Inline Editable Table in LWC

I have created a Custom Inline editable table in LWC. Here are the details: Apex Class : I am getting the fields to be displayed from Field set and created one wrapper class to pass the fields ...
0
votes
1answer
34 views

Wrapper Class is not covered in the test class

I'm having problems with my wrapper class, it is not being covered by my test class. here is my wrapper class public class DocuSignEnvelopeWrapper { public class Recipients { public List ...
1
vote
1answer
101 views

lightning:datatable with wrapper object rows question

I am trying to set a list of string values from a wrapper object dataClass @AuraEnabled public List<String> plannedDates; Relevant column of the datatable I am using is below: {label: ...
1
vote
1answer
293 views

LWC: Create New Instance of Custom Apex Class in Javascript

Im fairly new to LWC so any advice is appreciated here. How do I create a new instance of the OnboardingPeopleResult apex class below using javascript of my LWC? public class OnboardingPeopleResult { ...
2
votes
1answer
77 views

Converting List of Wrapper class objects to Map to overcome 'Collection Size' error

In regards to my previous question, my actual implementation is to Search contacts and display in the form of Wrapper records (have a checkbox next to each contact to select a few for further ...
0
votes
0answers
18 views

inline edit with wrapper class is not working

i am using inline edit with wrapper class, but my records are not saved properly. IN debug logs it is display the old values only. deleting record is working fine, but inline edit is not working. ...
0
votes
3answers
573 views

Populate radio button options dynamically

I am trying to set a radio button's options dynamically. I'm first constructing a wrapper list in my first component and passing the list to another component where I'm displaying the values. Apex ...
1
vote
1answer
36 views

Wrapper class data is not showing up in pageblock table after commandbutton action

Im having trouble getting a list from my wrapper class to show up in a page block table after clicking a command button. Can someone tell why my wrapper class is not showing up in the table? Is the ...
0
votes
1answer
127 views

How to access parent object fields fron child object instance in wrapper class in salesforce?

Apttus_Proposal__Proposal_Line_Item__c(Child) having lookup to (Parent)Proposal obj(Apttus_Proposal__Proposal__c). private class xyz{ public Apttus_Proposal__Proposal_Line_Item__c ...
0
votes
0answers
34 views

Visualforce attachment is not downloading

Requirement - I want my image to get download or open after clicking on link and I have 2 additional column in my table which should get updated with name of person who click on the image and time.For ...
0
votes
2answers
40 views

Display Dynamically Added Contacts through VFP on another VFP

I have a VFP here that has the ability to add/remove rows of Contacts.  After I click 'Save Contact', I am redirecting the page to a PDF (VFP) that should display the Contacts that were added.  ...
2
votes
2answers
603 views

Iterating over wrapper class records lists in LWC

I have a LWC where i want to iterate over different lists of Opportunities in a wrapper. Currently im using: import { LightningElement,wire } from 'lwc'; import OppRecords from '@salesforce/apex/...
0
votes
1answer
38 views

My wrapperlist is not showing up

I trying to create a table to provide metrics on the number of Account and Contact records grouped by state. So each state will have two number of count id. Below is a code for my class and visual ...
0
votes
0answers
160 views

Add multiple records in an object using visualforce page using wrapper class

I want to add multiple records to a custom object(Order line item) which is a related list in another custom object(Order). so when i click save the multiple products should get saved in order line ...
0
votes
0answers
28 views

Assign list of users to queues from VF page [duplicate]

I am currently working on a requirement where I need to assign users to a queue. I have created one VF page which dynamically pulls the users list show in VF page. When an agent selects the users ...
0
votes
1answer
409 views

Issue with passing class data from apex to javascript in LWC [closed]

I am trying to return multiple values from the apex to javascript using wire decorator. Because of functions in apex cannot return multiple values at the same time, I am returning custom class ...
0
votes
1answer
113 views

How to write a wrapper class for my trigger?

I want to create a trigger that will only pass its trigger context to a static method in a handler class I have created where all the business logic resides. I want to pass the trigger context ...
0
votes
1answer
53 views

Writing test class for wrapper class to simulate the business process

I am trying to write a test class for a Wrapper class. The wrapper class pulls one objects to make it as a checkbox list. Could anyone help me to adjust the code I wrote below? I have written test ...
0
votes
1answer
483 views

Lightning Web Component not loading while using Lightning-Input with Wrapper class variable

I am trying to build a simple Lightning Web component to allow capturing both parent and child record details on single form. To explain i am taking an example of capturings single Account and Contact ...
0
votes
1answer
457 views

'Bad Request' when inner class instance from Apex to LWC

I'm working on a Lightning Web Component which calls an API from Apex and display the response in the component with the help of a wrapper class. The response is displaying correctly in the apex ...
0
votes
0answers
37 views

Apex how to loop through returned records and pick the one that has a checkbox checked

I am trying to look through a list of records returned after I perform a search. Within my custom VF controller, I have another class/wrapper, where I am getting all of the fields. Is it possible to ...
0
votes
1answer
263 views

Error: Invalid Type

What is it I am doing to get the invalid type error? public with sharing class MyController { public list<JSONWrapper> wrapper {get;set;} public integer appTotal{get;set;} ...
1
vote
1answer
23 views

JSON String incompletely wrapped

After deserializing a JSON response and casting it to the wrapper class, I see that in the debug logs half of the JSON is missing. Am I deserializing the JSON incorrectly? Or am I not creating a ...
0
votes
3answers
128 views

Error: Malformed JSON: Expected '[' at the beginning of List/Set

JSON Response: { "caPerformanceRecordList": [ { "motorDealerID": "XL1HX", "dealerName": "Subaru Auto Dealer", "reportingPeriod": "2019-05-18", "...
0
votes
0answers
37 views

Trying to Display a sample JSON response in Visualforce Page

What am i doing wrong? I have taken the json response I got from the webservice callout and trying to display the response in Visalforce page. However the button 'Submit' is not making its way to the ...
3
votes
1answer
388 views

List on Wrapper class not visible in lightning component

I have an Aura component and I want to iterate through a wrapper class of objects, which has two lists as properties. While I can iterate through the wrapper class list, my lists come up as null when ...

1
2 3 4 5
7