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
22 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
0answers
17 views

How to return account from wrapperclass

I want to display a relation of object in a visualforce page for Account>property__c>Booking__c>Order>OrderItem. With some help (Keith c) I have a wrapperclass to return the records by using a get ...
0
votes
0answers
11 views

Pass Multiple Id's from Apex class/Vf page to visualforce email template

As we know that we can pass id from visualforce email template to controller but what I need is totally different . I am getting 2-3 id's into vf page by selecting checkbox's which I want to pass to ...
0
votes
1answer
19 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
20 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
38 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
31 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
59 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
79 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
28 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
49 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
34 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
33 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
91 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
33 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
27 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
33 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
106 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
224 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 "...
0
votes
1answer
331 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
174 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
143 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
105 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
255 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
51 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 ...
0
votes
1answer
551 views

Rendering data from Wrapper Class into Lightning Data table

Hi I'm trying to render data from a wrapper class it's coming up with row but values are empty. Component: <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,...
2
votes
1answer
38 views

List Sort Using Wrapper Class

I created following Wrapperclass to sort quote based on ceratedDate global class QuoteCreateDateSortWrapper implements Comparable { public Quote quo; //Constructor public ...
1
vote
2answers
81 views

How to get code coverage on formula fields in a wrapper class

I need to get code coverage on UpgradeRate, PlusCount2, PremiumCount2 and PrestigeCount2, but what I have is not working. How do I get code coverage on these? In my custom controller, I have the ...
-1
votes
1answer
263 views

How to fix Wrapper class to insert/delete selected records?

When I use my Wrapper class to delete some records, my Select button doesn't work (without wrapper it works fine). So I even can't check, is my delete-code works or not. What is wrong here? Apex: ...
0
votes
1answer
139 views

JSON string unserialize to APEX using wrapper class [duplicate]

I'm not able to get rows list....it is coming null from below code. public class ParsingTest1 { public ParsingTest1() { String jsstring = '{"totalsForAllResults": {"users": "...
0
votes
1answer
25 views

Apex:param not calling method

Hi I have requirement of producing a list in home layout with number is records available in different conditions and on pressing a button redirecting to the specific list view I came up with the ...
0
votes
1answer
87 views

Does lightning:recordEditForm works for wrapper classes with an sObject?

I have a wrapper class which can hold a custom object record and some variables. However I want to leverage this out of the box lightning:recordEditForm for displaying the wrapper class records (...
0
votes
1answer
71 views

Maximum stack depth reached: 1001 inner class

I'm trying to export record on into a tab separated text file. In getting Maximum stack depth reached: 1001 in the inner class where i'm doing the piece of code and I have pasted full code in the ...
0
votes
1answer
2k views

Using wrapper Class in Lightning:Datatable

I am trying to set the data of the Lightning:Datatable from the wrapper class in server-side Controller. public class AccountWrapper{ @AuraEnabled public Account acct {get;set;} ...
0
votes
1answer
32 views

Using IF in a wrapper class

I have created a wrapper class which creates a record called Remittance_Advice_Line_Item__c, when a user selects a checkbox (called selected), and saves on a Visualforce page. The record(s) that are ...
1
vote
1answer
81 views

How can I dynamically add input fields in visual force on a button click?

I want to add a button "ADD NEW RECORD". When the button is clicked, a new row for input fields of accounts should be added along with the checkbox wrapped with it. How can this be done? EDIT: Also, ...
0
votes
1answer
342 views

How to Access Wrapper class variable in javascript?

Trying to access the wrapper class variable in javascript, but it's not serialized in apex controller. trying to get the value in for loop - mainly for validation purpose. function ...
0
votes
1answer
156 views

Lightning : Unable to update records displayed using wrapper class

Can anyone please help me in this? My initial Use Case Scenario was to display a list of records in a lightning component, and providing the ability for users to update the same records. This was a ...
2
votes
2answers
389 views

How to set inner class list as aura attribute? [closed]

I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on. Usually in visualforce page, ...
0
votes
1answer
273 views

How to bind the wrapper class data into custom objects fields and display it in pageblocktable

I have created REST which fetching the data from pardot and displaying it on the vf page. It is working fine. But I need to store this data in the custom object's corresponding fields on the vf page. ...
-3
votes
1answer
60 views

facing issues with wrapper in wrapper class [closed]

I am trying to implement something like to display open carts and this repctive cart line items Something like Cart1 details Cartlineitem1 details Cartlineitemdetails2 Cart2 details ...
2
votes
1answer
28 views

Query related to DML Example for AccountWrapper

I am trying to implement below example shown in screenshot :- I want to check that for records where checkbox is selected, name field should not be null, then only insertion should happen, but name ...
0
votes
0answers
98 views

How to sort a wrapper class in client side javascript in lightning

I have a wrapper class (contains Opportunity object as a variable and other Integer and String variables) which is iterated inside a table in lightning component. Columns in table --> Opportunity ...
1
vote
2answers
160 views

Passing List<WrapperClass> as a parameter from Visualforce to Lightning and to iterate over the List<WrapperClass>

This is my VF code, which runs on onclick <script> function func(data) { $Lightning.use("c:testingFromVFtoLightningApp", function(){ $Lightning.createComponent("c:...
3
votes
1answer
252 views

How do I correctly cast List in wrapper class?

I am receiving the following error in my Apex runtime: JSONException: Expected List<ApexBatch.SFError> but found { It's do with how I'm assigning the response to my wrapper but I'm not sure ...
0
votes
2answers
95 views

Visualforce page resets wrapper fields during rerender

I have a wrapper class to that include opportunity line items and a selectlist value set. When the page is rerendered, the oli fields are maintained, but the selectlist values are reset. I can't see ...
2
votes
1answer
431 views

CompareTo - Sort order by date in Wrapper class

I have recently had help creating a Wrapper class to combine 2 separate objects, Delivery_Note__c and Remittance_Advice__c, into one list, both with their own date fields. The list is then rendered on ...
0
votes
1answer
12 views

Test button's action that adds OpportunityLineItem

I have a problem with one code's part. Controller (a part): public void click(){ for(WrapperClass wrp : wrapperRecordList){ if(wrp.isSelected){ ...
-1
votes
1answer
260 views

Combining two object's records and sort by date

I have 2 lists from different objects which I would like to combine into one in a Visualforce component. The objects are not directly related, but both have amounts and a date which i am trying to ...
0
votes
1answer
49 views

Test coverage for a wrapper class which has no methods and constructor in it

I have below kind of wrapper class which has no methods and constructor. public class PP_SI_Wrapper { public class checkBoxWrapper{ @AuraEnabled public String que; @AuraEnabled ...