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

How to populate related records in VF page?

I have a custom object as 1)salesregion 2)salesoffice 3)property salesoffice has masterdetail relationship with salesregion property has lookup relation with salesoffice There is a button named "...
4
votes
2answers
77 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
90 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
26 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
27 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
47 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
28 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
181 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
23 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
52 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
149 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
36 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
16 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
220 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
26 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
104 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
33 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
32 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
364 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
36 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
88 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
26 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 ...
-1
votes
1answer
257 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
70 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
43 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
369 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
370 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
34 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
161 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
102 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
287 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 ...
0
votes
2answers
434 views

Nested wrapper class to use with Aura:iteration in lightning component

How to use aura:iteration over a list of Wrapper class object in Lightning component 1st Aura iteration works well it prints axisNo and axisName correct. But nested iterate with nested wrapper class ...
0
votes
1answer
49 views

How SWAP(rows UP and DOWN) in Pageblocktable in Visualforce page using Apex method

Here I'm Trying to do swapping on Pageblocktable means I want my rows to be Up and down Right now it's happening through Javascript Now I want this through APEX method. Please look at the below ...
0
votes
0answers
58 views

How to copy data to text fields when checkbox is checked

I have a little challenge which I'm trying, I want whenever the checkbox is checked I want to copy the values into input text fields in visualforce page. So here I have multiple rows and ...
0
votes
1answer
49 views

deserializing of json using wrapper class in apex

I have following type of json { "itemsPerPage" : 1, "links" : { "next" : "" }, "list" : [ { "id" : "19623", "resources" : { "reports" : { "allowed" : [ "GET" ], ...
0
votes
1answer
64 views

How to define a class as get set variable in another class

I am trying to call a wrapper class which is written independently. I am trying to call the class as a get set variable in a apex class. But getting error while i try to define the class as get set ...
1
vote
1answer
222 views

Lightning Input on wrapper class not passing back the value

I am using a wrapper class so as not to have a glut of aura:attributes (this may be the problem in and of itself). I have a previous lightning component that has about 16 attributes and passing them ...
0
votes
1answer
54 views

Error : Attempt to de-reference a null object ; on map variable

Class.ResourceProfileController.__sfdc_mapSummary: line 137, column 1 Class.ResourceProfileController.__sfdc_listWrapperEmployee: line 162, column 1 --> Error on the Variable mapSummary Hello I'm ...
0
votes
1answer
38 views

Constructor not defined: [weather001.weatherresult].<Constructor>() while using wrapper class

I am getting error as Constructor not defined: [weather001.weatherresult].() at the time of creating instance for wrapper class. below is the code. public class weather001 { public string ...
0
votes
2answers
105 views

Boolean value set in a wrapper not showing correct

Hi I a trying to set a Boolean value in a wrapper based on a condition. Wrapper Class public class Wrapper{ public String pf {get; set;} public Boolean show {get; set;} public Wrapper (...
0
votes
1answer
210 views

Test Class for Comparable Wrapper class

I am trying to write a test class for a Comparable Wrapper with little success. The wrapper class pulls in two objects to make one single list. I have two issues... I don't know how to cover the ...
0
votes
1answer
486 views

How to serialize REST Request from Wrapper class for existing Salesforce data?

I am trying to format my SObject data within a wrapper class to POST data to another Salesforce org from a custom Work__c object, but I am having a hard time understanding how to add an instance of "...
1
vote
1answer
804 views

How to create JSON string for REST callout from Wrapper class

I have found a lot of different examples of this, but I'm still having troubles accomplishing this. Here is the webservice which is working: //WORKING Webservice in target org @RestResource(...
0
votes
2answers
370 views

Access child records without using wrapper in apex controller

I have Question__c(parent) and Option__c(child) Master detail relationship. On page load I am able to pass the data to lightning component without help of any warapper class. Now on submitting the ...
4
votes
3answers
246 views

Adding a Wrapper Class to an External Class

I am confused about what is happening in a small section of some code. I have a class that has a wrapper class inside it. There is an external class that calls this wrapper class Models.add(new ...
2
votes
1answer
234 views

Nested Wrapper data not being return in lightning component callback

I currently have this very nested wrapper class, public sharing class ResultWrapper { //This wrapper is contain more wrappers that goes as far as 5 level deep. @AuraEnabled public ...
2
votes
1answer
609 views

JSON.deserialize on custom sObject not parsing related fields from lookup relationship

I've got a map whose values are a wrapper class. The wrapper class holds a custom sObject list, and the sObject in turn was queried to include related fields from a lookup relationship. Problem is, ...
0
votes
1answer
84 views

Data binding issue with wrapper class

This is a continuation of another question with code pared down as much as possible. I'm trying to create a series of pageblocktables on a VF page, each displaying some number of empty rows which ...

1 2 3 4 5 7