Query Territories Assigned to Account or Lead in Salesforce

Introduction Sometimes it may beed needed to query Territories assigned to Lead or Account. Solution Field Name Details AssociationCause Possible values are:Territory2AssignmentRule—Territory assignment rule associationTerritory2Manual—Manual association ObjectId Lookup Refers ToAccount or Lead SobjectType Account or Lead Territory2Id Territory Id

How to access Compound field values in Apex Salesforce

What is compound field? Compound field – for example Address and Geolocation – binds together multiple information into a single unit. Like Address is one unit of information but actually it is comprises of different primitive information like Street Address, City, State, Country & Postal Code. Can we query/access address field without addressing individual field …

How to access Compound field values in Apex Salesforce Read More »

Maximum SOQL offset allowed is 2000 for Pagination

Salesforce Help Article There is a help article suggested by Salesforce: https://help.salesforce.com/articleView?id=000339353&type=1&mode=1. However, there are some good ways to use this. PK Chunking – the one we used to use Bulk API For example, let’s say you enable PK chunking for the following query on an Account table with 10,000,000 records. SELECT Name FROM Account …

Maximum SOQL offset allowed is 2000 for Pagination Read More »