Apex Interview Question Salesforce Part 4

H. Integration – Salesforce Interview Questions

An external ID is a custom field which can be used as a unique identifier in a record. External IDs are mainly used while importing records/ data. When importing records, one among the many fields in those records need to be marked as an external ID (unique identifier).

An important point to note is that only custom fields can be used as External IDs. The fields that can be marked as external IDs are: Text, Number, E-Mail and Auto-Number.

C. Audit & Reporting Features – Salesforce Interview Questions

A bucket field lets you group related records together by ranges and segments, without the use of complex formulas and custom fields. Bucketing can thus be used to group, filter, or arrange report data. When you create a bucket field, you need to define multiple categories (buckets) that are used to group report values.

The advantage is that earlier, we had to create custom fields to group or segment certain data.

3 How can you expose an Apex class as a REST WebService in Salesforce?

You can expose your Apex class and methods so that external applications can access your code and your application through the REST architecture. This is done by defining your Apex class with the @RestResource annotation to expose it as a REST resource. You can then use global classes and a WebService callback method.

Invoking a custom Apex REST Web service method always uses system context. Consequently, the current user’s credentials are not used, and any user who has access to these methods can use their full power, regardless of permissions, field-level security, or sharing rules.

Developers who expose methods using the Apex REST annotations should therefore take care that they are not inadvertently exposing any sensitive data. Look at the below piece of code for instance:-

Find out our Salesforce Training Course in Top Cities

2 What are the basic difference between Application Event and Component Event in Aura component?

Application Event Component Events
Application Events are handled by any component have handler defined for event.These events are essentially a traditional publish-subscribe model Component Events can be handled by same component or a component that instantiates or contains the component
Application event can be used through out the application. The component events can only be registered in child component and handled by parent component
We use attribute type="APPLICATION" in the aura:event tag for an application event. We use attribute type="COMPONENT" in the aura:event tag for a component event.

How many callouts to external service can be made in a single Apex transaction?

Governor limits will restrict a single Apex transaction to make a maximum of 100 callouts to an HTTP request or an API call.

2 What is Async Apex in Salesforce? How many ways do we have for Async processing?

In technology terminology, Asynchronous operation means that a process operating independently of other processes.

  • Schedule & Batch jobs
  • Queues
  • @future
  • Change Data Capture – Apex Triggers (Summer ’19)
  • Platform Events – Event Based
  • Continuations (UI)
  • What is the difference between Roles and Profiles?

    Profiles help to control object privileges such as CRED (Create, Read, Edit, Delete). They also contain system permissions that a user can carry out such as exporting data. Profile used for object level and Field level access. It is mandatory for all Users

    Roles on the other hand help with sharing records across an organization. They work in a hierarchical fashion, giving users access to records that are owned by people lower down in the hierarchy. Roles used for Record level access. It is not mandatory for all Users.

    Salesforce developer interview questions and answers || 2022 || Part 4 || APEX (Continued)

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *