June 24, 2020

Salesforce Interview Questions with Answers Part 64

1. Ten Minute Build
The 10-minute build practice is an extreme programming practice where the code base is designed by the developer to be built automatically.
Having a simple build is important because it is easy to build up from that. Most developers hurry and develop a build that is intended to cover all possible outcomes from the first stage of the build; this causes complications as the project develops.

2. Callout from Salesforce Flow
If Salesforce creates, updates, or deletes data in your org and then accesses external data in the same transaction, an error occurs. In your flow, we recommend using a separate transaction to access data in an external system. To do so, end the prior transaction by adding a screen or local action to a screen flow or a Pause element to an autolaunched flow. If you use a Pause element, don't use a record-based resume time. For example, a screen flow creates a contact and then displays a confirmation screen. Next, the flow updates the contact in the external system. The flow doesn’t fail because it uses a separate transaction to access the external data.

https://help.salesforce.com/articleView?id=flow_prep_bestpractices.htm&type=5

3. Maximum execution time for each Apex transaction
10 minutes.
Transaction may synchronous or Asynchronous. The limit is 10 minutes.
https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm

4. Bulk API 2.0
Bulk API 2.0 provides a simple interface to quickly load large amounts of data into your Salesforce org and to perform bulk queries on your org data.

1. Support for OAuth 2.0
Bulk API 2.0 supports all OAuth flows supported by other Salesforce REST APIs.
2. Automatic File Batching
Bulk API 2.0 simplifies uploading large amounts of data by breaking the data into batches automatically. All you have to do is upload a CSV file with your record data and check back when the results are ready.
3. Daily Limits Based on Number of Records
Instead of limiting the amount of data uploaded daily by the quantity of jobs, Bulk API 2.0 uses a limit of total records uploaded. The limit is 100 million records per 24-hour period.

Limit:
Salesforce automatically chunks the data for your job into multiple internal batches to improve performance while processing the job. Salesforce creates a separate batch for each 10,000 records in your job data, up to a daily maximum of 100 million records.

https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/introduction_bulk_api_2.htm

5.What Is DMARC?
Domain-based Message Authentication, Reporting, and Conformance (DMARC) is an email authentication, policy, and reporting protocol. It’s built on top of Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM) protocols. If neither of those authentication methods passes, the DMARC policy determines what to do with the message. Salesforce supports and recommends DMARC. It’s up to you to determine whether you implement it for your domain.

DMARC is a second layer of authentication after DKIM and SPF. If an email doesn't pass DKIM and SPF authentication, DMARC policy tells the receiver what to do with the message. For example, it can reject some email messages and quarantine others.

Reference Link - https://help.salesforce.com/articleView?id=emailadmin_dmarc.htm&type=5

6. Work Item Size and Agent Capacity Salesforce Chat
Omni-Channel is a work routing system.
Omni-Channel works on the concept of Work Items. Each time a case is assigned to a queue, a work item is created and pushed to the agents. Omni-Channel tracks the number of work items assigned to an agent based on number of primary tabs related to the work items are open.
Set how much work your agents can handle at once. Size your chats relative to agent capacity so that agents can handle multiple chats, but aren't overworked.
In Work Item Size, set the amount of an agent’s capacity that one work item consumes.
In Agent Capacity, set the agent’s total capacity.
Units of Capacity indicates the amount of an agent’s overall capacity that’s consumed when the agent is assigned a work item from queues that are associated with this configuration.

The Capacity setting in the presence configuration the agent is assigned to determines the agent’s overall capacity. When the agent is assigned a work item from the queue that’s associated with this configuration, the Capacity Weight is subtracted from the agent’s overall capacity. Agents can be assigned work items until their overall capacity reaches 0.

You can select a Capacity Weight or a Capacity Percentage, but not both.

https://help.salesforce.com/articleView?id=000338278&type=1&mode=1

7. Arrow Function in JavaScript
Arrow functions also called “fat arrow” functions are a more concise syntax for writing function expressions.
Arrow functions were introduced with ES6 as a new syntax for writing JavaScript functions.
fat arrow symbol ( => ).

Without Arrow Function:
testFunc = function() {
  return "Welcome to InfallibleTechie";
}


With Arrow Function:
testFunc = () => {
  return "Welcome to InfallibleTechie";
}


With Arrow Function with Parameters:
<p id="test"></p>
<script>
var hello;
hello = (val1, val2) => val1 + val2;
document.getElementById( "test" ).innerHTML = hello( 3, 2 );
</script>


Output is 5.

this keyword impact:
Arrow functions allow you to retain the scope of the caller inside the function.
The value of "this" inside a function can’t be changed. It will be the same value as when the function was called.
If you need to bind to a different value, you’ll need to use a function expression.

8. Entitlement Templates in Salesforce 
Entitlement templates let you predefine terms of support that users can add to products. If Entitlement template is assigned to ProductA and if Asset is created with the ProductA, Entitlement Process from the Entitlement Template is automatically linked. You can see the Entitlements from the Asset Related List.

http://www.infallibletechie.com/2020/05/entitlement-templates-in-salesforce.html

9. Perform Synchronous Compile on Deploy
This feature is enabled automatically for production orgs but it's an opt-in feature for sandboxes.

Previously, installation and upgrades with large packages resulted in all classes not being compiled.  This causes serious app performance issues until all classes are compiled.

Each org’s Apex code is now automatically recompiled before completing a metadata deploy, package install, or package upgrade. This change in behavior improves performance following metadata deploys and package updates. Previously, a deploy, install, or upgrade could leave an org with invalidated code, causing reduced performance while Apex was recompiled.

This feature causes deployments to the org to invoke the Apex compiler and save the resulting bytecode as part of the deployment. A minimal increase in deployment times can occur, but Apex doesn’t need to be recompiled on first run. So the slight increase in deployment time can prevent performance issues on first run.

1) Go to Setup --> Apex Settings
2) Enable "Perform Synchronous Compile on Deploy"

10. ConnectedAppPlugin Class
Contains methods for extending the behavior of a connected app, for example, customizing how a connected app is invoked depending on the protocol used.
This class gives you more control over the interaction between Salesforce and your connected app.

When you create a connected app, you specify general information about the app and settings for OAuth, web apps, mobile apps, and canvas apps. To customize how the app is invoked, create a connected app handler with this ConnectedAppPlugin Apex class. For example, use this class to support new authentication protocols or respond to user attributes in a way that benefits a business process.

The class runs on behalf of the current user of the connected app. But the user must have permission to use the connected app for the plug-in to work. If the user isn’t authorized for the connected app, use the authorize method.

11. GitHub and Git

GitHub

GitHub is where people build software.

1. Create a Repository.
2. Write code in your local.
3. Commit changes($git push -u origin master.
4. Make a pull request.

Git
Git is a distributed version-control system for tracking changes in source code during software development.

1. Write code. Initialize the git($git initialize).
2. Store the changes in your local($git add).
3. Commit the changes($git commit).
4. Push the changes($git push).
5. Make a pull request.

12. getObjectInfo

Use this wire adapter to get metadata about a specific object. The response includes metadata describing fields, child relationships, record type, and theme.

Sample Use Case:
Use getObjectInfo to return the object’s fields. All wire adapters in the lightning/ui*Api modules respect object CRUD rules, field-level security, and sharing. If a user doesn’t have access to a field, it isn’t included in the response.

13. Experienced Page Time in Salesforce Lightning Experience

Experienced Page Time is to add an EPT counter directly to Lightning Experience, which displays in the header. EPT is the time it takes to download and display the entire content of a webpage in a browser window.

1. Add ?eptVisible=1 to the end of the URL.To turn off after testing, use ?eptVisible=0.
2. Enable Lightning Component Debug Mode from Setup.

System exception 'ConcurrentUiRequests Limit exceeded' will be raised when you exceed governor limitations for your Salesforce organization. By default this is typically set to 25 long running UI requests for 10 seconds. This may vary depending on your Salesforce edition (displayed in the title bar of your browser).

14. Enhanced Email in Salesforce

Enhanced Email elevates email to a standard Salesforce object, with customization options and an API. Emails are no longer stored as tasks, but as full-featured records, complete with details, related lists, and collaboration tools. On email records, users can view their messages exactly as their customers do, complete with formatting.

With Enhanced Email, emails are stored using the standard Salesforce object, EmailMessage. The EmailMessage object gets you all the conveniences that come with standard objects, including custom fields, customized layouts, and a better record detail page.

15. Send Email to Members in Salesforce Queue

If you want to send an email notification to all queue members individually when a new case gets added to the queue.

The Send Email to queue members alert will only work if you are using Case Assignment Rules and Active Assignment checkbox to move Case to a Queue. If you are moving the case Manually to a Queue or using a Workflow, it does not trigger the Email alert.

Reference Link - https://help.salesforce.com/articleView?id=000323036&type=1&mode=1

No comments:

Post a Comment