• Andrew Gray
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 4
    Replies
When looping the list aes - I want to know if a Trading_Relationship__c exists with same Cust__c/Supp__c values. Am trying to put all TRs into nested list to check against. Is that easiest way and how do I check in the loop? Thanks
 
List<Trading_Relationship__c> trs = [SELECT Id, Customer__c, Supplier__c FROM Trading_Relationship__c];  
Map<Id, List<Id>> trmap = new Map<Id, List<Id>>();
for(Trading_Relationship__c tr: trs) {
trmap.put(tr.Customer__c, new List<Id>());
}  
for(Trading_Relationship__c tr: trs) {
trmap.get(tr.Customer__c).add(tr.Supplier__c);
}


for(Agent_Engagements__c ae: aes) {
//ae.Cust__c
//ae.Supp__c
??
}


 
Am struggling with nested lists. I want to create one list (list2) with all the string values from the nested lists in list1. How do I assign in the loop ?
 
public static void ctask1(List<List<String>> list1){

		List<String> list2 = new List<String>();

        for(List<String> l: list1) {          
            //?                 
        }

}


Thanks

 
I have external system inserting Accounts in batches of 200. I have added a After Save record triggered flow that has 1 Get Records element in it and updates the Account. 

Am trying to understand what is happening with limits here. I get a CPU timeout error - presumably for the overall transaction of 200. Was also expecting SOQL error but debug logs seem to say the SOQL count is seperate for each account not cumulative for the 200? Is that correct? 




 
Hi - basic beginner apex question but struggling. 

The list TR2 will have duplicate values for Supplier__c. I want to end up with map with count of records for each Supplier__c.

What needs to go in the for loop to get this ? Thanks 
 
List<Trading_Relationship__c> Tr2 = [SELECT Supplier__c FROM Trading_Relationship__c WHERE Supplier__c IN :AccIds ORDER By Supplier__c ASC];

Map<ID, Integer> Map1 = new Map<ID, Integer>();
        
 for (Trading_Relationship__c eachTr : Tr2){   
            
            
        }
When creating the sales dashboard I can see from other threads people have changed the label of "Record Count" to "Number of Deals" - How do you do this ?  thanks 
 
My Trailhead profile page says 2 completed but IF I got the the main trails page I can see Ive got 4 marked as complete? Am I misunderstanding  something?  
Hi 

Trailhead just hanging when I press check answers ? Logged into dev org but hanging even on quiz answer type sections ? Any Ideas ? 

Thanks 

Andrew
 
On this Challenge under Advanced Formulas : 

Your company sells cylindrical hyperbaric chambers. You need a formula field that calculates the volume of a cylinder for you, rounded to the nearest whole number, given its radius and height. Use the existing mathematical formula for the volume of a cylinder, V = πr2h, where r is the radius of the cylinder, h is the height, and π is the constant Pi. Note: Although this formula field might best be created on a custom object, for simplicity, we’ll create this formula on the Opportunity object.

I get an error  about Discount_Percent__c being a missing field. This feild doesnt appear to have anything to do with the challenge ?? Confused.

Thanks 

Andrew
Hi 

Trailhead just hanging when I press check answers ? Logged into dev org but hanging even on quiz answer type sections ? Any Ideas ? 

Thanks 

Andrew
 
When looping the list aes - I want to know if a Trading_Relationship__c exists with same Cust__c/Supp__c values. Am trying to put all TRs into nested list to check against. Is that easiest way and how do I check in the loop? Thanks
 
List<Trading_Relationship__c> trs = [SELECT Id, Customer__c, Supplier__c FROM Trading_Relationship__c];  
Map<Id, List<Id>> trmap = new Map<Id, List<Id>>();
for(Trading_Relationship__c tr: trs) {
trmap.put(tr.Customer__c, new List<Id>());
}  
for(Trading_Relationship__c tr: trs) {
trmap.get(tr.Customer__c).add(tr.Supplier__c);
}


for(Agent_Engagements__c ae: aes) {
//ae.Cust__c
//ae.Supp__c
??
}


 
I have external system inserting Accounts in batches of 200. I have added a After Save record triggered flow that has 1 Get Records element in it and updates the Account. 

Am trying to understand what is happening with limits here. I get a CPU timeout error - presumably for the overall transaction of 200. Was also expecting SOQL error but debug logs seem to say the SOQL count is seperate for each account not cumulative for the 200? Is that correct? 




 
My Trailhead profile page says 2 completed but IF I got the the main trails page I can see Ive got 4 marked as complete? Am I misunderstanding  something?