Skip to main content

Posts

ASYNC SOQL - with Big Objects

Async SOQL Async SOQL is a method for running SOQL queries when you can’t wait for immediate results. These queries are run in the background over Salesforce big object data. Async SOQL provides a convenient way to query large amounts of data stored in Salesforce. Async SOQL is implemented as a RESTful API that enables you to run queries in the familiar syntax of SOQL. Because of its asynchronous operation, you can subset, join, and create more complex queries and not be subject to timeout limits. This situation is ideal when you have millions or billions of records and need more performant processing than is possible using synchronous SOQL. The results of each query are deposited into an object you specify, which can be a standard object, custom object, or big object. The limit for Async SOQL queries is one concurrent query at a time. Async SOQL Versus SOQL SOQL and Async SOQL provide many of the same capabilities. So when would you use an Async SOQL query instead of s...
Recent posts

SOQL with Big Objects

SOQL with Big Objects You can query the fields in a big object’s index using a subset of standard SOQL commands. Build an index query starting from the first field defined in the index, without gaps between the first and last field in the query. You can use  = ,  < ,  > ,  <= , or  >= , or  IN  on the last field in your query. Any prior fields in your query can only use the  =  operator. The  != ,  LIKE ,  NOT IN ,  EXCLUDES , and  INCLUDES  operators are not valid in any query. You can include the system fields  CreatedById ,  CreatedDate , and  SystemModstamp  in queries. To retrieve a list of results, do not use the  Id  field in a query. Including  Id  in a query returns only results that have an empty ID (000000000000000 or 000000000000000AAA). The following queries assume that you have a table in which the index is defined by  LastName_...

Define & View Custom Big Object

Define a Custom Big Object: You can define custom big objects with Metadata API or in Setup. After you define and deploy a big object, you can view it or add fields in Setup. After you’ve deployed a big object, you can’t edit or delete the index. To change the index, start over with a new big object. To define a big object in Setup, see Salesforce Help. View a Custom Big Object in Setup After you’ve deployed your custom big object, you can view it by logging in to your organization and, from Setup, entering  Big Objects  in the  Quick Find  box, then selecting  Big Objects . Click the name of a big object, to see its fields and relationships. View a Custom Big Object in Setup After you’ve deployed your custom big object, you can view it by logging in to your organization and, from Setup, entering  Big Objects  in the  Quick Find  box, then selecting  Big Objects . Click the name of a big object, to see its fields and ...

Big Objects - Introduction

Big Objects A big object stores and manages massive amounts of data on the Salesforce platform. You can archive data from other objects or bring massive datasets from outside systems into a big object to get a full view of your customers. Clients and external systems use a standard set of APIs to access big object data. A big object provides consistent performance, whether you have 1 million records, 100 million, or even 1 billion. This scale gives a big object its power and defines its features. There are two types of big objects. Standard big objects —Objects defined by Salesforce and included in Salesforce products.  FieldHistoryArchive  is a standard big object that stores data as part of the Field Audit Trail product. Standard big objects are available out of the box and cannot be customized. Custom big objects —New objects that you create to store information unique to your org. Custom big objects extend the functionality that Lightning Platform provides. For ...

When should we use Platform Events vs SOAP/REST APIs

Introduction This post is an extension of a  Question  on Salesforce Stack Exchange and the discussion around the same. With so much attention on this topic, I thought of putting a comparison of when to use Platform Events vs. APIs (REST/SOAP) when it comes to Integration. The post describes the basics of both features and how they compare with each other and scenario when those are used. If you happen to come across this post, do leave your feedback and recommendations. Let’s Get Started What is Platform Event? Simply speaking, it is Salesforce’s approach of implementing an  Event Driven Architecture . While I am not going into details of the architecture itself, this approach leads towards a  Pub/Sub  (Publisher/Subscriber) model. The model establishes a “Publisher” which publishes any data change using events (or messages), which is subscribed by one or more “Subscribers” which listen on those events and accordingly take action. So When Do ...

Platform Events in Batch Apex

Fire Platform Events from Batch Apex Classes Introduction  With winter 19 release you can able to fire the platform events from the batch apex.Batch Apex classes can opt in to fire platform events when encountering an error or exception. Clients listening on an event can obtain actionable information, such as how often the event failed and which records were in scope at the time of failure. Events are also fired for Salesforce Platform internal errors and other uncatchable Apex exceptions such as LimitExceptions, which are caused by reaching governor limits. An event record provides more granular error tracking than the Apex Jobs UI. It includes the record IDs being processed, exception type, exception message, and stack trace. You can also incorporate custom handling and retry logic for failures. You can invoke custom Apex logic from any trigger on this type of event, so Apex developers can build functionality like custom logging or automated retry handling. To fire a ...