How to Assign Query result to List Collection | Apex in Salesforce | SOQL Queries | SFDC Tutorial 9

Опубликовано: 25 Июнь 2026
на канале: Garg for Geeks
543
13

Hello Friends,This is Anirudh Garg
Welcome to the Ninth Video of Salesforce: Fundamental to Advance Course
Here I have depicted How to Assign Query results to List Collection and debugging the List Elements and List Size in Execute Anonymous Window
Salesforce Object Query Language(SOQL) in Salesforce is used to retrieve Salesforce Objects data from the Salesforce database for specific information. This video covers everything you need to know as a beginner to SOQL
In Upcoming Videos we will learn about Other Collections namely Maps, Sets and how to decide when to use a List, Map, Set assign query to map apex collections in salesforce apex in salesforce list in apex

Trailhead Signup Link 👇 https://trailhead.salesforce.com/

My Trailhead Profile Link 👇 https://trailblazer.me/id/anirudhgarg

You can connect with me on Linkedin as well 👇   / anirudhgargdelhi  

Salesforce Complete Course playlist 👇    • Salesforce ( From Scratch to Advance ) Com...  

Tutorial 1 Link    • Salesforce Developer Edition Free Sign up ...  
Tutorial 2 Link    • Introduction to Tabs, Objects, Fields, Rec...  
Tutorial 3 Link    • Creating New User in Salesforce Org | Assi...  
Tutorial 4 Link    • How to Create a New Profile by Cloning exi...  
Tutorial 5 Link    • How to create Permission Set in Salesforce...  
Tutorial 6    • How to Create Free Trailhead Account | Tra...  
Tutorial 7    • How to Query Salesforce Objects using SOQL...  
Tutorial 8    • What are Aggregate Functions in SOQL Queri...  


Salesforce Developer Edition Account Free Sign up Video Link
   • Salesforce Developer Edition Free Sign up ...  

Stay tuned for upcoming videos where we will learn about each and every terminology of Salesforce in detail



IMPORTANT Links ⚠️ 👇

Signup for Salesforce developer edition using https://developer.salesforce.com/signup

Do Subsequent Logins using https://login.salesforce.com

Join Vidya Institute to get access to personalized support, early response to doubts 👇
   / @gargforgeeks  

Don't forget to Like, Comment and Subscribe Vidya Institute for upcoming salesforce videos updates 👇
https://www.youtube.com/c/VidyaInstit...

If u are still facing any doubt while doing hands on u can join our Whatsapp Group to get it cleared 👇
https://chat.whatsapp.com/Hn9Cop54zmZ...


Join 👇 our

Whatsapp Group - https://chat.whatsapp.com/Hn9Cop54zmZ...
Facebook Group :   / 2682764882009156  

Follow 👇Our

Facebook Page :   / vidyainstitutemaths  
Instagram Page :   / vidyainstitute_  
Twitter Handle :   / vidyainstitute_  

0:00 Subscribe for Latest Updates
0:11 Getting Logged in and Opening Developer Console
0:31 Writing the Query
1:14 Assigning Queried Record to Collection (List, Map, Set)
1:24 List Collection
1:44 Create Apex Class
2:05 Create Method inside Class
2:30 Brief about Apex Keywords ( Public Access Modifier, Return Type)
3:10 Syntax for Declaring a List
3:47 Assigning Query Result to Created List
4:47 Debugging the List containg Contact Records
5:12 Debug- Open Execute Anonymous Window-Execute-Open Logs
6:12 Getting the Size of List
6:40 List Size is same as Number of Records Rows in Query Results
7:18 In Upcoming Videos we will learn about Other Collections namely Maps, Sets and how to decide when to use a List, Map, Set
7:30 Stay Tunned, u can Connect with me on Linkedin

#Salesforce #SOQL #Collection #List #AggregateFunctions #AnirudhGarg #VidyaInstitute #newuser #salesforcerelease #salesforceknowledge #salesforcehulk #salesforcetrailhead #salesforcedevelopers #salesforcehunt #salesforcelightning #salesforcedeveloper #salesforceadmin #trailhead #lightningexperience #classicexperience #salesforceclassic #administrator #administration #developer #salesforceadministrator #salesforcedev #assign #assigning #accesspoint #accesslevel #access #salesforceorg #trailblazer #salesforcelightningexperience #sfdc #freedeveloperedition #crmtool #crm #newusers #userlicense #customerrelationshipmanager #applaunch #applauncher #appexchange #Role #Profile #Permissionset #Permissionsets #linkedin #access #grantingaccess #profilepermission #tab #object #field #record #fieldlevelsecurity #salesfoceorg #trailblazers #trailblazermotivation #trailblazercommunity #trailblazermotivational #Sql #sqlserver #sqlqueries #Sql #structuredquerylanguage #query #aggregatefunction #bindvariable #Aggregate #aggregatefunction #aggregates #AggregateFunctions #Lists #map #set #collections #ListCollection