- Create a list of strings and add five different city names to it. Then, remove the third city from the list and print the updated list.
- Create a list of integers and add ten random numbers to it. Sort the list in ascending order and print the sorted list.
- Create a custom object
Employeewith fieldsName(String) andAge(Integer). Create a list ofEmployeeobjects, add five employees to the list, and sort the list by age. - Create a set of integers and add ten different numbers to it, including some duplicates. Print the set and observe the behavior regarding duplicates.
- Create two sets of strings representing two different groups of students. Find the union, intersection, and difference of the two sets.
- Create a map with string keys and integer values. Add five key-value pairs to the map and print all the keys and values.
- Create a map where the keys are strings and the values are lists of strings. Add some data representing a department (key) and the list of employees (value) in each department. Print the map.
- Create a map where the keys are integers representing employee IDs and the values are
Employeecustom objects. Add five employees to the map and print the map. - Write an Apex class that updates the
Phonefield for a list ofAccountrecords using a map where the key is theAccountIdand the value is the new phone number. - Write an Apex class that inserts a list of new
Contactrecords for a specificAccount. - Write an Apex class that deletes all
Opportunityrecords with a specificStageNameusing a set ofOpportunityIds. - Write an Apex class that inserts a list of new
Contactrecords with specified names and associates them with a specificAccount. - Write an Apex class that updates the
Phonefield for a list ofAccountrecords using a map where the key is theAccountIdand the value is the new phone number. - Write an Apex class that deletes all
Opportunityrecords with a specifiedStageNameusing a set ofOpportunityIds. - Create a custom object
Course__cwith fieldsName__c(String) andDuration__c(Integer). Write an Apex class that inserts multipleCourse__crecords using a list. - Create a custom object
Student__cwith fieldsName__c(String) andAge__c(Integer). Write an Apex class that updates theAge__cfield for a list ofStudent__crecords using a map where the key is theStudentIdand the value is the new age. - Create a custom object
Employee__cwith fieldsName__c(String) andSalary__c(Decimal). Write an Apex class that deletes allEmployee__crecords with a salary less than a specified amount using a set ofEmployeeIds. - Write an Apex class that retrieves all
Contactrecords associated with a specificAccountand stores their email addresses in a set. Print the set of email addresses. - Create a custom object
Project__cwith fieldsName__c(String) andAccount__c(Lookup to Account). Write an Apex class that inserts multipleProject__crecords associated with a specificAccount. - Create a custom object
Order__cwith fieldsAccount__c(Lookup to Account) andAmount__c(Decimal). Write an Apex class that calculates the total order amount for each account and stores the results in a map where the key is theAccountIdand the value is the total order amount. Print the map. - Write an Apex class that updates the
CloseDateof allOpportunityrecords related to a specificAccountby setting it to 30 days from today. - Write an Apex class that creates a summary report of
Opportunityrecords grouped byOwnerId. Use a map where the key is theOwnerIdand the value is a list ofOpportunityrecords owned by that user. - Write an Apex class that tracks changes in the
Amountfield ofOpportunityrecords. Use a map where the key is theOpportunityIdand the value is the oldAmountbefore the update. - Write an Apex class that compares the
Phonenumbers ofAccountrecords from two lists and updates thePhonenumber of the records in the first list with the values from the second list if they differ. Use maps to facilitate this comparison. - Write an Apex class that removes duplicate
Emailaddresses from a list ofContactrecords. Use a map where the key is theEmailaddress and the value is theContactrecord. - Write an Apex class that groups
Contactrecords by theirAccountId. Use a map where the key is theAccountIdand the value is a list ofContactrecords associated with that account. - Write an Apex class that retrieves
Opportunityrecords byStageName. Use a map where the key is theStageNameand the value is a list ofOpportunityIds that have that stage. - Write an Apex class that creates and inserts
Contactrecords. Use a map where the key is theAccountIdand the value is a list ofContactnames. Each contact should be associated with the corresponding account. - Write an Apex class that updates the
Phonefield ofAccountrecords. Use a map where the key is theAccountIdand the value is the new phone number. - Write an Apex class that calculates the total amount of
Order__crecords for eachAccount__c. Use a map where the key is theAccount__cId and the value is the total amount of orders for that account. -
Create a custom object
Product__cwith fieldsName__c(String) andPrice__c(Decimal). Write an Apex class that uses a map where the key is the product name and the value is the price to insert multipleProduct__crecords. -
Delete
Opportunityrecords based on theirOpportunityId. Write an Apex class that uses a map where the key is theOpportunityIdand the value is a Boolean indicating whether to delete (true) or not (false). -
Create a custom object
Order__cwith fieldsAccount__c(Lookup to Account) andAmount__c(Decimal). Write an Apex class that calculates the total order amount for each account and stores the results in a map where the key is theAccountIdand the value is the total amount. -
Create a custom object
Student__cwith fieldsName__c(String) andGrade__c(String). Write an Apex class that retrieves allStudent__crecords and creates a map where the key is the student name and the value is the grade. -
Create a custom object
Employee__cwith fieldsName__c(String) andSalary__c(Decimal). Write an Apex class that updates theSalary__cfield forEmployee__crecords using a map where the key is theEmployeeIdand the value is the new salary. -
Create a custom object
Project__cwith fieldsName__c(String) andAccount__c(Lookup to Account). Write an Apex class that inserts multipleProject__crecords using a map where the key is the project name and the value is the associatedAccountId. -
Create a custom object
Course__cwith fieldsName__c(String) andInstructor__c(String). Write an Apex class that retrieves allCourse__crecords and creates a map where the key is the course name and the value is the instructor’s name. -
Write an Apex class that finds duplicate
Accountrecords based on theirNamefield. Use aSetto identify duplicate account names. -
Write an Apex class that retrieves all
Opportunityrecords and adds theirStageNameto aSet. Print the unique stage names. -
Write an Apex class that retrieves all
Contactrecords and uses aSetto find those that do not have an associatedAccount. -
Write an Apex class that removes duplicate
Leadrecords from aListbased on theEmailfield using aSet. -
Write an Apex class that checks for
Opportunityrecords where theCloseDateis in the past but does not have an associatedAccount. Use aSetto find those opportunities. -
Write an Apex class that validates whether a set of
ContactIDs exist in the database and prints the IDs of those that do not exist.

Winter ’26 Flow Highlights
Salesforce never fails to amaze us with every seasonal release, and Winter ’26 is packed with exciting new Flow enhancements that make automation smoother, smarter,

One Response
wonderfull