Questions tagged [nested]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
1answer
39 views

HOW TO Avoid three or more nested LOOPS [duplicate]

for(String objectName : jsonMap.keySet()){ // List<map<String,String>> listObjects=jsonMap.get(objectName); List<Map <String, String>> ...
0
votes
1answer
32 views

Create component used to include other components or static resources

In a custom lightning aura component app, I have a component where I want to include a static resource. I have successfully created the static resource (a JavaScript file) and included it in the ...
0
votes
1answer
32 views

Formula field with 4 IF statements and 2 False statements

I need to make a formula field work, unfortunately, I cannot figure out how to place statements so that I can include 2 False options (False options have been bolded) The logic behind the formula: If ...
1
vote
0answers
18 views

LWC Component cannot see Nested query

I'm having an issue showing nested apex query inside LWC result. return [SELECT Id, Name, Last_Maintenance_Date__c, Location__c,(SELECT Id, Date__c FROM Maintenances__r) FROM Car__c ...
0
votes
1answer
30 views

SOQL UserName and UserRole

Line: 5, Column: 1 System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: User.UserRole In the debug statement if I add UserRole.DeveloperName i get the ...
0
votes
2answers
10 views

Advance formula field nested condition not working

I want a formula like this: IF ( (Field1 = 'Value1' AND Field2 = 'Value2') OR ( NOT (ISBLANK (Field3))) ), "Output1", "Output2") This is my actual formula: IF( (...
0
votes
2answers
242 views

Json Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries at [line:1, column:83]

I have a Json string to do some testing on nested Json but get te error:Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries at [line:1, column:83] I can seem to figure ...
3
votes
2answers
39 views

How to deserialize object with nested query in a simply way

I have a JSON of object with nested query and I do not want to use JSON.deserializeUntyped and map values manually. Is there any easy way to do it? For example: Sobject object = (Sobject) JSON....
0
votes
0answers
22 views

Create map for unrelated objects

We have a object named Quote which is parent object in Lookup relationships with Quote Line object and Internal Calculation object. On Quote Line object we have From Currency, To Currency and ...
0
votes
1answer
103 views

Nested IF AND formula: Error when encoding row-level formula: Syntax error. Extra ','

I'm trying to create a row-level formula to calculate the following: I have a custom object called 'Car Transaction', with the following fields: 'Sign Up Fee' and 'Success Fee' Here is what I want the ...
0
votes
2answers
51 views

Help with SOQL Query to fetch all records with a combination of where and Limit

I am new to Salesforce . I'm faciing an issue to form a query to use it in a Apex class . Example Query : /*Set with all the LookupField__c lookup field id's */ Set<Id> LookupField ...
0
votes
1answer
28 views

Inner SOQL Queries

I would like to know if there are any limitations to inner(nested) SOQL Queries. The reason i am asking is that lately when i get a soql 101 error it leads me to queries that have multiple inner ...
0
votes
0answers
30 views

Compare two Set <String> and return list<String> that does'nt exist in Set2 [duplicate]

I am getting the desired result, but I want to avoid the nested FOR in my code. However my attempt failed. This is the best I could do. Can someone please guide me how I can avoid the nested FOR? // ...
1
vote
1answer
68 views

VF page render as pdf not working properly

I am trying to display some HTML(stored as HTML text in rich text field) in to vf page via output text tag. This HTML text has unordered list inside an unordered list(like a nested unordered list). It ...
0
votes
1answer
204 views

Share CSS Styles Among Lightning Web Components (Nested CSS) - not working

I'm trying to create a consistent look and feel for Lightning web components by using a common CSS module. For this, I have followed the solutions given in the summer 20 release notes and the LWC ...
0
votes
1answer
28 views

formula field with lots of nested Ifs and Ands - confusion

having a little trouble following the necessary logic to get this formula field syntax correct. i need to accomplish the following: If source_system__c="Adobe" AND If type__c="...
1
vote
1answer
155 views

SOQL API query with custom objects and relationships. Returning a flat result - Not nested

I am working with a third party software solution that consumes Salesforce API data via WDSL. I can run queries on any of the tables to return the result object - this works fine. I need to get ...
3
votes
1answer
240 views

How can i create a Map for unrelated objects?

Background We create shadow records for Contacts that are Inactive (record type) and I am working on building a UI for the user to Activate one or more shadow records associated to that Account. ...
0
votes
3answers
653 views

What happens with an IF formula with multiple TRUE conditions?

I have a multi nested IF statement like below - what happens if a field meets more than one condition - is there a rule to determine which value gets returned? IF(CONTAINS( Custom__Name__c , "/cs/"), ...
0
votes
1answer
32 views

Hot to get value of relationship dynamic Soql

I am using the following string in a dynamic soql: SELECT id, name, orderdate__c, status__c, sold_To_Customer__r.id, sold_To_Customer__r.name, sold_To_Customer__r.customerreference__c, ...
0
votes
1answer
127 views

Mastering Maps: Help needed for bulkifying a simple Opp Trigger Handler

As a beginner I'm currently learning how to bulkify my Apex Classes. I wrote an Apex Class with the following logic: When an Opportunity's stage is changed to Closed Won ... 1. Create an Asset for ...
2
votes
1answer
60 views

Only the first IF condition works, and the rest doesn't when nested in Process Builder formula

GOAL: I'm trying to create this criteria in Process Builder where I can detect phone number like (000) 000-0000, 000-000-0000 and 000.000.0000 and turn them into +1 0000000000 format. I tried to ...
1
vote
1answer
245 views

SFDX FORCE:DATA:TREE:EXPORT Nested __r Relationship Query

I am attempting to export data using the FORCE:DATA:TREE:EXPORT CLI command, using a nested query like the following (for use in our Scratch-Orgs): SELECT ...,(SELECT ... FROM My_Custom_Object__r) ...
0
votes
2answers
1k views

How to save record from a different object using nested recordEditForm

I have managed to get fields from two different objects to display in one lighting component but I am having a few problems off the back of this. When saving it will only save the main record and ...
0
votes
1answer
26 views

How to nest a map to get a related structure

I want to display a relation Account>property__c>Booking__c>Order>OrderItem in a visualforce page. I want to nest the objects to represent these as parent>grandchildren> grand grandchildren>etc. I am ...
-4
votes
1answer
88 views

Trigger not creating a new record [closed]

If case status got change for certain record type, new support record should get created. I configured status and record type combination in custom setting I am trying to avoid nested loop in my ...
-1
votes
1answer
182 views

How to avoid nested loop in the trigger [closed]

We have a trigger if case status got change new support record should get created. but in my case it is creating more than one record, I am thinking it might be because of a nested loop can someone ...
0
votes
1answer
83 views

Nested AMPScript in Email HTML

I'm trying to make the following code work: If you can't see the images in the email below %%=CONCAT(“<a href="%%view_email_url%%">click here</a>”)=%%… The Concat function is to stop the ...
0
votes
1answer
1k views

How to parse nested objects in JSON response

Im trying to parse the below JSON response: { "preferredLanguage":"en", "preferredLocale":"en_GB", "languages":{ "en":{ "langCountry":"en-bn", ...
1
vote
1answer
14 views

Avoid specifying an outer class when using its nested class outside

How can I avoid specifying an outer class when using its nested class outside the outer? For example, I have the following: public with sharing class ClassA { public class NestedInA { } } ...
1
vote
1answer
11k views

Formula Field - Case Function

Am trying to build a formula field with multiple IF conditions, so decided to go with Case function, below is the return statement based on the picklist value 0 Member 2 Member 3 Member 22 Only a ...
0
votes
1answer
1k views

Compare Value of One Map with Key of Another Map to create new Map?

I have two maps, and am currently using a nested for loop to compare the keys of one map with the values of the other, and then placing the matching info into a new map. Is there a more efficient way ...
0
votes
1answer
66 views

Spurious parenthesis issue in Nested IF statement (continued)

I dived into a nested if statement and it's now way over my head. Could you please take a look and let me know why it doesn't work? All I wantis to categorize our accounts based on multiple criteria. ...
0
votes
1answer
1k views

Nested IF with PICKVAL

I dived into a nested if statement and it's now way over my head. Could you please take a look and let me know why it doesn't work? All I wantis to categorize our accounts based on multiple criteria. ...
1
vote
2answers
562 views

Displaying nested maps in pageBlockTable

I have a nested map - map<product2,map<string,forecast__c>>, where the string represents a month period, ie "Apr 2018". I've put the months in an ordered list of strings called ...
0
votes
1answer
3k views

Nested For Loop and SOQL Best Practice

I am in need of looping through three Objects: Opportunity, OpportunityContactRoles, and a custom object we will call CR__c. My question is: is it better to write a Wrapper class for these three ...
0
votes
1answer
96 views

Can I nest these queries?

I have two queries and I somehow need to get them to work together... SELECT Owner.Name Salesperson, RecordType.Name, COUNT(Id) FROM Opportunity WHERE CALENDAR_MONTH(CreatedDate) = 1 AND ...
7
votes
1answer
3k views

SOQL: Comparing two custom relationship fields in a nested query

I think I may be hitting some sort of SOQL limitation in the WHERE clause. I am trying to return fields from two parent objects, after comparing two date fields on both Objects. The goal is to have a ...
0
votes
1answer
705 views

How to group fields in a visualforce table

I have a visualforce page that shows cohorts and the contacts enrolled in the cohort. I am looking for ways to group the contacts with an but can't figure out how to do it. If anyone could explain to ...
1
vote
1answer
5k views

Nested IF formulas for a simple logic field on the opportunity

Can you please cast your eyes at my formula and spot the mistake? I've been trying to crack this but to no avail. Looked through example nested formulas and this forum as well... I know I'm just ...
0
votes
1answer
448 views

how can i revise this to avoid nested for loops?

for(String name : nameList ){ for(WrapperClass wrap : WrapListRun){ if(name == wrap.acc.Name){ accountWrapperList.add(wrap); } else if(name == wrap.con.Account....
6
votes
1answer
8k views

Lightning component event not fired or handled

To build a nested component structure as detailed here I have build the solution described in one of the answers which recommended to send an APPLICATION event... parentInitialized.evt <aura:...
2
votes
1answer
2k views

Custom Object Nested Query on Standard Object [duplicate]

Is it possible to do a custom object nested query on a standard object? Like so: [SELECT (SELECT Id, Case__c FROM Accounting_Instructions__c WHERE Accounting_Complete__c = TRUE AND Case__r.Id =:...
0
votes
1answer
54 views

Why do I get an error on Quotes.Id in my SOQL query

I have the following query where when I remove the where part it works fine. When I add the WHERE part I get an error on Quotes.Id SELECT Name, StageName, CloseDate , Amount, (SELECT Id FROM Quotes) ...
0
votes
3answers
3k views

Save a nested query into a Map

I have a nested query: List<Case> comments = [SELECT (SELECT Id, CommentBody, CreatedDate, ParentId, CreatedById FROM CaseComments), AccountId, CaseNumber FROM Case WHERE AccountId = :...
0
votes
2answers
143 views

Tiered Case Priority and Response Time Formula

I have a formula to measure SLA response times, however it doesn't seem to be filtering based on priority as it's intended. It only seems to filter as if Priority is Low on the case, or just always ...
11
votes
2answers
4k views

How deep can nested Maps go, and how do I properly add data to those nested maps?

Background: Long story short, my company is integrating with a platform that has a "Role Hierarchy", so to speak, but that Hierarchy isn't stored in Salesforce. To get the "roles" I have to query ...
1
vote
0answers
1k views

How to export data queried from nested loop soql query

I need to export data by using nested loop query.Both workbench and data loader does not allow to export data queried from nested loop.Is there any way to export nested loop queried data.
2
votes
2answers
2k views

Accessing fields from nested SOQL and exposing them in Visualforce

I have a question in regards to Nested SOQL queries and exposing their fields, that are part of that Nested SOQL, into a Visualforce page. This is a structure sample: List<Object1> obLis=[...
0
votes
1answer
268 views

Trying to run SOQL query on master detail relationship between tasks and leads for Conga report

I'm trying to get a table of all the individual tasks that belong to specific leads. I only want to pull tasks that belong to leads with a custom checkbox field "hedgehog_account__c = true." The ...