- 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
Employee
with fieldsName
(String) andAge
(Integer). Create a list ofEmployee
objects, 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
Employee
custom objects. Add five employees to the map and print the map. - Write an Apex class that updates the
Phone
field for a list ofAccount
records using a map where the key is theAccountId
and the value is the new phone number. - Write an Apex class that inserts a list of new
Contact
records for a specificAccount
. - Write an Apex class that deletes all
Opportunity
records with a specificStageName
using a set ofOpportunityId
s. - Write an Apex class that inserts a list of new
Contact
records with specified names and associates them with a specificAccount
. - Write an Apex class that updates the
Phone
field for a list ofAccount
records using a map where the key is theAccountId
and the value is the new phone number. - Write an Apex class that deletes all
Opportunity
records with a specifiedStageName
using a set ofOpportunityId
s. - Create a custom object
Course__c
with fieldsName__c
(String) andDuration__c
(Integer). Write an Apex class that inserts multipleCourse__c
records using a list. - Create a custom object
Student__c
with fieldsName__c
(String) andAge__c
(Integer). Write an Apex class that updates theAge__c
field for a list ofStudent__c
records using a map where the key is theStudentId
and the value is the new age. - Create a custom object
Employee__c
with fieldsName__c
(String) andSalary__c
(Decimal). Write an Apex class that deletes allEmployee__c
records with a salary less than a specified amount using a set ofEmployeeId
s. - Write an Apex class that retrieves all
Contact
records associated with a specificAccount
and stores their email addresses in a set. Print the set of email addresses. - Create a custom object
Project__c
with fieldsName__c
(String) andAccount__c
(Lookup to Account). Write an Apex class that inserts multipleProject__c
records associated with a specificAccount
. - Create a custom object
Order__c
with 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 theAccountId
and the value is the total order amount. Print the map. - Write an Apex class that updates the
CloseDate
of allOpportunity
records related to a specificAccount
by setting it to 30 days from today. - Write an Apex class that creates a summary report of
Opportunity
records grouped byOwnerId
. Use a map where the key is theOwnerId
and the value is a list ofOpportunity
records owned by that user. - Write an Apex class that tracks changes in the
Amount
field ofOpportunity
records. Use a map where the key is theOpportunityId
and the value is the oldAmount
before the update. - Write an Apex class that compares the
Phone
numbers ofAccount
records from two lists and updates thePhone
number 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
Email
addresses from a list ofContact
records. Use a map where the key is theEmail
address and the value is theContact
record. - Write an Apex class that groups
Contact
records by theirAccountId
. Use a map where the key is theAccountId
and the value is a list ofContact
records associated with that account. - Write an Apex class that retrieves
Opportunity
records byStageName
. Use a map where the key is theStageName
and the value is a list ofOpportunity
Ids that have that stage. - Write an Apex class that creates and inserts
Contact
records. Use a map where the key is theAccountId
and the value is a list ofContact
names. Each contact should be associated with the corresponding account. - Write an Apex class that updates the
Phone
field ofAccount
records. Use a map where the key is theAccountId
and the value is the new phone number. - Write an Apex class that calculates the total amount of
Order__c
records for eachAccount__c
. Use a map where the key is theAccount__c
Id and the value is the total amount of orders for that account. -
Create a custom object
Product__c
with 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__c
records. -
Delete
Opportunity
records based on theirOpportunityId
. Write an Apex class that uses a map where the key is theOpportunityId
and the value is a Boolean indicating whether to delete (true) or not (false). -
Create a custom object
Order__c
with 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 theAccountId
and the value is the total amount. -
Create a custom object
Student__c
with fieldsName__c
(String) andGrade__c
(String). Write an Apex class that retrieves allStudent__c
records and creates a map where the key is the student name and the value is the grade. -
Create a custom object
Employee__c
with fieldsName__c
(String) andSalary__c
(Decimal). Write an Apex class that updates theSalary__c
field forEmployee__c
records using a map where the key is theEmployeeId
and the value is the new salary. -
Create a custom object
Project__c
with fieldsName__c
(String) andAccount__c
(Lookup to Account). Write an Apex class that inserts multipleProject__c
records using a map where the key is the project name and the value is the associatedAccountId
. -
Create a custom object
Course__c
with fieldsName__c
(String) andInstructor__c
(String). Write an Apex class that retrieves allCourse__c
records 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
Account
records based on theirName
field. Use aSet
to identify duplicate account names. -
Write an Apex class that retrieves all
Opportunity
records and adds theirStageName
to aSet
. Print the unique stage names. -
Write an Apex class that retrieves all
Contact
records and uses aSet
to find those that do not have an associatedAccount
. -
Write an Apex class that removes duplicate
Lead
records from aList
based on theEmail
field using aSet
. -
Write an Apex class that checks for
Opportunity
records where theCloseDate
is in the past but does not have an associatedAccount
. Use aSet
to find those opportunities. -
Write an Apex class that validates whether a set of
Contact
IDs exist in the database and prints the IDs of those that do not exist.
NetSuite Salesforce Integration: An Automation Guide
NetSuite Salesforce Integration is the seamless connection between NetSuite, a leading cloud-based Enterprise Resource Planning (ERP) system, and Salesforce, a premier Customer Relationship Management (CRM) platform.
One Response
wonderfull