Questions tagged [wrapper]

The tag has no usage guidance.

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

Error “ List has no rows for assignment to SObject”

I am doing a wrapper class binding account and its related contact and opp record. For starters, there is only one Account with the name 'Account1'. 'Account1' only has 1 Contact and 1 Opportunity. My ...
0
votes
2answers
45 views

Trigger with Wrapper class

I have created a wrapper class in which I have Name and Rating variables which are string type. 1)I have pulled out Account with the name and Rating and wrapped it in a wrapper class and stored the ...
2
votes
1answer
88 views

Is it possible to cast wrapper instance dynamically?

I wonder if it is possible to cast object parameter passed from LWC Component to specific instance of Wrapper class. In Example we have WrapperB that extends WrapperA and we want to cast data passed ...
0
votes
0answers
9 views

Wrappers Impact on Overall Code Coverage? [duplicate]

If a given wrapper doesn't have any method(even no get;set;) that class won't get listed under 'Overall Code Coverage' section in the developer console. Does this mean such Apex wrappers do not impact ...
0
votes
1answer
24 views

Need help in creating multiple lists from one query in Apex Class

I am trying to achieve a list like this (conWrapper:[BankName=abcd, Branch=main, phone=123456789], conWrapper:[BankName=abcd, Branch=main, phone=987654321]) From below class, public without sharing ...
0
votes
0answers
26 views

Edit table in lwc displayed using wrapper structure

i am beginner to lwc and got stuck at a point. i have created two wrapper class one is inner wrapper like this and other is outer wrapper Now in html i am displaying outer wrapper list like this to ...
0
votes
0answers
20 views

Cover aggregate Result Wrapper Class in test class [duplicate]

I'm having a hard tome covering the wrapper class for an aggregation in a test class. I'm only getting 48%. Can anyone see what I am missing? This Apex supports a VF page, where the user selects the ...
0
votes
1answer
48 views

APEX - Initialize sub classes in a constructor

I am trying to find a solution to initialize a subclass in a constructor, but I have the following error message : Variable does not exit: Info public class Products { public String Name; ...
0
votes
1answer
211 views

Lightning Web Component - Combo box - populate value from Wrapper Class

I am trying to populate a list of contacts from the Wrapper class.However, I am not getting any values to display in the Combo box. Here are my codes Apex Controller Class: public with sharing class ...
0
votes
1answer
75 views

Issue while saving the wrapper data through imperative way of LWC

I am trying to pass the listofWrapper-> (List) data to Apex method for DML operation. I am not able to figure out how to get Outer loop index ("Oppindex") for any change in the child ...
3
votes
1answer
221 views

How can I use a reserved keyword as an identifier in my JSON wrapper class

From salesforce Trying to Create PayPal payment, In Create Payment method request object has Items with Currency like below "name": "hat", "description": &...
0
votes
1answer
21 views

we are trying to create a reports with all sobjects even though it has relationship or not

We are trying show reports data in a table similar to Salesforce we are unable to show data like Salesforce. please find below the screenshot for your reference.
1
vote
1answer
369 views

LWC JavaScript way to copy List [List A, List B] Values to a single List

I'm looking for a way to copy wrapper list of content values to a single list Example: LIST<wrapper> dataAandB= [LIST A,LIST B] => List A =[Object X :{Id,Name ... }] and List B =[Object Y :{...
0
votes
1answer
97 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
0answers
22 views

Test class for below wrapper class in salesforce [duplicate]

public class SortingDates { Public List<SortingDatesWrapper> cList {get;set;} public SortingDates() { cList = new List<SortingDatesWrapper>(); List<...
0
votes
2answers
168 views

Create Wrapper class in apex - Variable Does Not Exists

I'm new to salesforce. getting Variable does not exist: parguarList Can anyone please help on this, public with sharing class GetParentGuardianController { public List<ParentGuardian> ...
0
votes
0answers
93 views

1/2 Test Methods Passed: first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []

I have two test methods doing similar things, but one fails. Test Code is: @IsTest private class CaseDocumentListControllerTest { static testMethod void testGetContentDocuments() { ...
0
votes
1answer
441 views

lwc wrapper class

I'm working on some more LWC learning - trying to understand how a custom wrapper class is displayed in the component. If I have this APEX, .js, and HTML - the value of field1 is never displayed - ...
0
votes
3answers
2k 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 ...
0
votes
1answer
121 views

Invalid type when creating a map of <string, list<innerclassobject>>

Invalid type: EcPerformanceRecordList I want to create a Map of userid and list of sObject records, then loop through this map so that I can count how many apps have been submitted per user....
0
votes
1answer
852 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
7k views

lightning data table : how to fetch record id for the selected row

I have created a datatable in lightning using a wrapper class. I have added a edit button inside the datatable to edit a particular column field from the table. Now i need the record id of the record ...
0
votes
1answer
558 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 ...
0
votes
1answer
1k 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
votes
1answer
703 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: ...
2
votes
1answer
52 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
1answer
374 views

Assigning Custom Setting value to Custom object Field

/***********Custom setting **********/ Map<string, CountryCO__c> codes = CountryCO__c.getAll(); string pb; list<string> pb1=new list<string>(); for (...
0
votes
1answer
35 views

Combining Picklist Options

I have to create a picklist to replace a lookup to prevent my users from seeing all of the lookup records. It throws an error when it is blank when we go to edit it so I had to write it like this: ...
1
vote
1answer
116 views

Wrapper class Referencing?

How do I reference my wrapper class in my prepareshipment method? My goal was to set tNumber and location to = my fields on my shipment object. In my VF page I want tNumber and Location to display ...
2
votes
3answers
588 views

SOQL Query Limits in Wrapper Class (using dlrs)

I have been trying to build a wrapper class which creates a junction Object (Delivery_Note_Line_Items__c) between two other objects (orderLine & Delivery_Note__c) depending on the Visualforce's ...
-3
votes
1answer
301 views

Attempt to de-reference a null object — while querying OrderItem

I am creating a vf page where a user can create multiple orderitem for a order by adding dynamic rows. When a user selects any product from product lookup, i have an actionsupport which will query ...
0
votes
1answer
146 views

Make field Mandatory when corresponding record button is clicked

I have the following code in my Lightning Component <aura:iteration items="{!v.wrapAccountList}" var="arItem" indexVar="index"> <tr> <div class="slds-truncate"> <...
1
vote
1answer
976 views

How to use the wrapper class in HTTP getmethod [duplicate]

below is my code Created a wrapper class like below public class ResponseWrapper{ public list<Account> lstaccounts; public boolean isError ; public string errorCode; public ...
-1
votes
1answer
287 views

Wrapper class in Http getmethod

below is my code Created a wrapper class like below public class ResponseWrapper{ public list<Account> lstaccounts; public boolean isError ; public string errorCode; public ...
2
votes
2answers
399 views

Where/How can I store a variable and access while I build my wrapper? It's either null in wrapper itself or the scope isn't visible at top level

I have a set of ids called oppIdsInWrapper inner class. However while I build my wrapper, this is always null and empty. I want be able to reference this as I build my records to avoid duplicate ids. ...
2
votes
1answer
47 views

Wrapper class is having problems compiling. Not sure how to resolve? Incorrect signature when adding more rows to wrapper class

I'm trying to explore my options for rotating a VF table by mimicing the following post: http://bobbuzzard.blogspot.com/2010/09/rotating-visualforce-table.html However near the bottom I'm having ...
0
votes
1answer
907 views

apex:InputText value is not setting on the controller

I have a problem with a Visualforce and I am not being able to solve. In the VF I have a form with two sections: one to fill the fields I'll use in the controller to create a quote and a dataTable ...
1
vote
1answer
5k views

Adding to sub list/array within apex wrapper class

I am trying to figure out how to add to this wrapper class. public class Invoice { public String Type; public LineItem[] LineItems; public class LineItem { public String ItemCode; public ...
1
vote
0answers
37 views

Wrapper needed? Looking for assistance

I am attempting to display a VF page listing contacts under a Tier Level. Tier Level is a custom object that is a lookup field on the account record. For example, a contact belongs to an account. ...
-2
votes
1answer
45 views

How to generate VF page for the following wrapper class?

public class Employeewrapper { public string name{get;set;} public decimal salary{get;set;} public decimal exp{get;set;} public string technology{get;set;} } ==================== ...
-1
votes
1answer
297 views

Object lookup field not fetching values in wrapper class

I am using this below wrapper class in a method which is called from a action support from vf page. In debug log - @@@@offerId --> Id of the record But @@@@offervalue i am getting null. I am not ...
-1
votes
1answer
855 views

Sort Wrappers In JSON?

public with sharing class TableData { public String Id { get; set; } // hash modified public Decimal duration { get; set; } public String description { get; set; } public String name ...
0
votes
1answer
2k views

Unknown Property with a StandardController

I am having an issue with my standard controller. I have utilized the Salesforce wrapper class suggestions as a framework for this project. Within the project I am supposed to make a pageBlockTable ...
0
votes
1answer
273 views

Wrapper Class SOQL not retrieving dynamic values

I have created a Wrapper class to present data from different objects Event__c and Campaign. The class works fine when I hardcode the values for the SOQL statements but when I assign the dynamic ...
1
vote
3answers
495 views

How can I have 100% code coverage in wrapper class + meaningful testing

I'm learning programming and now I would like to have 100% code coverage + meaningful test. How can I test line: lstw.add(new wrapper(acc[i].name,acc[i].id,con[i].LastName,con[i].id)); and how can I ...
3
votes
2answers
200 views

Sorting of two different records referencing their dates

I just want to ask if comparing of each fields on separate object is possible in order to show first the most recent. Example, I have Object A and Object B, and Object A has Hired_Date__c , and ...
0
votes
1answer
47 views

Sorting of the 2 child records referencing each of their date fields (START DATE)

I have three objects, the Professional_Experience__c, Assignment__c, and Project__c. Professional Experience has two child (Assignment__c, and Project__c). Then the Assignment__c has also a child (...
1
vote
1answer
238 views

Sorting of fields of custom object using comparable in a wrapper

I have a wrapper class which is sorted by the totalCount of the size of the three list (empSkillList, empTrainingList, and empCertificationList). Can I sort it also by the fields inside the list of ...
0
votes
1answer
275 views

Sorting of fields of custom object inside a wrapper

We have a wrapper class which contains different list of custom object. We want to sort it through the field referenced by different custom object. How can we achieve this? The code below shows a ...
1
vote
1answer
648 views

How to get my data into javascript chart by parsing report data?

I have manged to collect all required data but not able to parse it into the list so that i can pass my data into a chart. for now i have added debug data in to chart as static to relate this chart ...