Setup Flashcards

1
Q

What is a valid consideration regarding development in a multi-tenant environment ?

A

Salesforce updates automatically 3 times a year and cannot be scheduled. Sandbox are upgraded prior to production environments so that the changes can be previewed and tested.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which of the following are true regarding developing in the Salesforce multi-tenant environment?

A

Queries should be selective in terms of the number or records returned.

Salesforce delivers polyglot persistence transparently.

→ Force.com integrates and optimizes several different data persistence technologies to deliver transparent polyglot persistence. Only a single API needs to be coded to, no matter which type of persistence is optimal for a given situation. The platform monitors queries and DML operations and throws a runtime exception if they exceed governor limits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following events are fired when an Aura component loads on a page?

A

afterRender
render
init

→ The ‘init’ event signals that a component initialization is complete. The ‘render’ event triggers the start of component rendering. The ‘afterRender’ event signals that the rendering is complete. At this point, one can interact with the DOM tree to do additional processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is true regarding the Salesforce multitenant environment?

A

Automatic upgrades are applied during the year according to the Salesforce release schedule to all customers.

All customizations are specified as metadata, following easy upgrades.

→ All standard and custom configurations, functionality, and code in an org are metadata. These customizations are separated in a special metadata layer, so upgrades can easily be performed. These upgrades are released automatically three times a year for all customers.
In Salesforce’s multitenant environment, users share the same code base and database. Hence, governor limits are strictly imposed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Because Apex runs in a multitenant environment, the Apex runtime engine enforces limits to ensure that Apex code or processes don’t monopolize shared resources. What are valid examples of these limits?

A

CPU time per transaction
Time executing a SQL query
Total number of records retrieved by SQOL queries

→The runtime engine enforces limits of how long a SOQL query can run, how many records can be returned in a query and the maximum amount of CPU time a transaction can take. The maximum number of records that can be stored in a object is dependent of the storage and is not subject to a governor limit.
Unlike SOQL queries, there is no maximum execution time for DML statements. There is, however, a limit for the total number of DML statements that can be executed in an Apex transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Sarah has set up the standard Email-to-Case functionality and is testing it. She has found that cases are created from emails sent to the designated email address with the subject populated from the email subject and the case description populated from the email body. The support emails are sent using a standard format that includes the case priority and site location of the customer issue. How can these fields be set automatically when the case is created?

A

Create a custom email handler to map the fields.
Create a before insert trigger on the case object to update the case priority and site location fields.

→ A custom email handler can be used to parse email and update the case priority and site location fields. A before insert trigger on the Case object can also be used to parse info from the description field which contain the mail body after cases are created from Email-to-Case.
Email-to-Case can only map the email subject to the case subject and the email body to the case description. It is not possible to add further field mappings. Workflow rules alone cannot handle complex parsing required in this scenario.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A developer has created a custom Lightning component, but the component isn’t showing up in Lightning App Builder. Why?

A

My Domain has not been defined as public.

→ My Domain must be configured and deployed to the org in order to use Lightning components. Lightning components do not need to be activated after being deployed to the org. Lightning components are defined as public by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cosmic Solutions uses a third-party platform for managing their employees’ compensation plans. It needs to be integrated with its Salesforce org. For example, when the third-party platform send a request for a particular resource to the org, the org should respond to the request by sending data in JSON format. In addition, when certain records are changed in the org, the third-party platform should be automatically notified of the change. Which of the following should be used to meet the requirement?

A

REST API
Streaming API

→ Both REST API and SOAP API can be used to integrate a Salesforce org with an external system. However, While REST API supports both XML and JSON data formats, SOAP API only supports XML. Streaming API, which uses the publish-subscribe model, is used for setting up notifications that can be triggered when record changes are made in the Salesforce org. For example, the external system can subscribe to a platform event in the org and receive a notification when a specific data change occurs. Bulk API is used for loading or deleting large sets of data in the org.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A Salesforce developer wants to build a custom user interface for internal users. The interface will contain fields pulled from different Salesforce objects, some of which are not related. Which is the most suitable solution?

A

Develop a Visualforce page to display fields from the different objects.

→ Since the custom user interface is for internal use only and needs to pull Salesforce date from different objects, a programmatic solution such as a Visualforce page or custom Lightning component is required.
A page layout cannot display fields from unrelated objects. Heroku is bast used for customer-facing sites. Dynamic Forms and Field Section Lightning components are supported in Lightning record pages only and support fields that are related to the primary record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A developer is creating a custom Lightning page with multiple Aura components and wants certain components to refresh when the information in other components changes. The component causing the change and the components that needs to be refreshed may or may not be in the same parent component. How can this be accomplished?

A

Use an application event to notify other components of the change and give them a chance to handle it.

→ The Lightning framework uses event-driven programmatic, so an event is the appropriate solution. Application events allow all components on a page, regardless of the containing component, to respond to an event. Component events can only be handled by components in the firing component’s containment hierarchy. Since, in the given scenario, components may reside in the same or different containers, an application event is the correct approach.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A requirement has been given to display the average value of won opportunities on the Account page layout. How can this be best achieved?

A

Use roll-up summary fields and a formula field.

→ The requirement can be met by completing the following configuration. A roll-up summary field is created that counts the number of won opportunities. Second, another roll-up summary field is created that sums the amount of won opportunities. Third, a new formula field is created that calculates the average. For example, Total_Won_Amount__c / Total_Won_Amount__c.
Roll-up summary fields have Count, Sum, Min and Max functions, but do not support the Average function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

There is a requirement to rate all accounts daily based on the values of the opportunities closed in the current year, the number of open opportunities, and the opportunity close rates. The account with the highest aggregated result should be rated number 1, and so on until the account with the lowest rating is updated. How could this requirement be achieved?

A

Use a Batch Apex job and schedule it to run each night.

→ PB, Workflow rules or triggers cannot be configured to run periodically at fixed timings or intervals, nor can processes or workflows cans perform complex calculations. A scheduled Apex would be suitable for this requirement since it can be set to run at regular intervals and perform the required logic. Note that auto launched flows can also be scheduled, but if the logic is too complex, Apex should be used. Also, batch Apex has much higher governor limits compared to scheduled flows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following are valid considerations that a new developer should be aware of when developing in a multi-tenant environment?

A

Restrictions are enforced on code that can be deployed into a production environment.
Governor limits ensure that the amount of CPU time is monitored and limited per customer over a defined time period to ensure that performance in one org is not impacted by another.

→ Although many customers share the same instance, it is not possible for one customer query to return data from another customer. Each row in the table that stores application data includes identifying fields, such as the organization that owns the row (OrgID).
The toral API requests (calls) per 24-hour period is limited for an org. Governor limits monitor and limit various factors such as CPU time and DML statements to ensure that one org does not impact another. Code cannot be deployed into production unless test code coverage is achieved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A Salesforce developer is building a Lightning Aura component and is refactoring code to create a common function that will be reused by several other Js functions in the component. Which file in the component bundle should contain the common function?

A

The helper file.

→ The helper file is the most appropriate place to put functions that can be called by any Js code in a component bundle. The component file contains the markup for the component, while the controller file contains functions that are typically called as a result of a browser or platform event. The design file exposes attributes of the component that can be modified from an interface such as Lightning App Builder.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Cosmic Finance Solutions has recently switched to Lightning Experience. The Salesforce Admin of the company would like to make use of LC to enhance the user experience. Which of the following can be created using the Lightning App Builder?

A

Custom home pages
Single-page apps
Custom record pages

→ App pages, record pages, home pages, and email application pages can be built using Lightning App Builder.
Lightning tabs can be created in the Tabs page in Setup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following use cases are valid for using declaratives customization?

A

Displaying the number of employees of the account related to an opportunity on the Opportunity page layout.

Calculating the number of days until an opportunity closes and displaying the value on a report.

Determining a lead rating that is based on the value of three fields on the lead record.

→ The NumberOfEmployees field on the Account object can be displayed in the related Opportunity object using a cross-object formula field. The TODAY() function and an Opportunity’s CloseDate field can be used in a formula to determine the number of days left leading to its close date in a custom field or row-level formula field in a report. Fields, functions and operators can be sued in a formula to generate certain output such as lead rating.
A complex calculation that involves a number of lookups would be to complex for a formula field and would need a programmatic solution. A flow could be used for a simple calculation but not when there is complex business logic involved. Cross-object formula fields cannot be used in roll-up summary fields.

17
Q

A company has a business requirement that cannot be met using the declarative tools available in its SF org. As a result, the SF Admin of the company has resorted to installing a suitable package available in the AppExchange marketplace. What are the benefits of using AppExchange?

A

AppExchange apps may include support and maintenance.
AppEchange offers reviewed and proven solutions for customers.

→ SF AppExchange is a marketplace for downloading solutions such as apps and components for the SF platform. It has both free and paid solutions, which may include support and maintenance.
The AppExchange platform is used for installing an already build solution instead of additional development tools for building the solution. It is not used for scanning security vulnerabilities.

18
Q

Cosmic Innovation is considering the use of the LC Framework to build a custom application for managing the company’s products. Which of the following are valid capabilities of the framework that would be useful for understanding how to develop and provide access to the custom application?

A

The framework provides two programming models for development, namely, Aura Components and LWC.
The framework uses Js on the client-side and Apex on the server-side.
The components built using the framework can be added as custom tabs on the navigation bar.

→ Aura Components and LWC can coexist and interoperate on a page. The framework utilizes a stateful client (js) and a stateless server (Apex).

19
Q

Cosmic Solution has a custom object called Weekly Employee Summary, which stores a summary of employee data that is tracked in SF, such as work hours and wage totals. An autolaunched flow has been built to calculate this information and create a new Weekly Employee Summary record for each employee every time it is run. Currently, a SF admin needs to run this flow manually once a week. They would like to be run automatically in the future. Which solutions would meet this requirement?

A

Replace the autolaunched flow with a schedule-triggered flow.
Invoke the flow from an Apex job that runs weekly.

→ The simplest solution is to invoke an autolaunched flow based on a schedule. Schedule-triggered flows can be configured to start on a specified date and time, with several frequency options. The scheduling configuration can be accessed by editing the flow’s Start node.
A more complex solution would be to invoke the flow from an Apex class that implements the Schedulable interface, then schedule the class to run weekly. 
PB and WF rules are not necessary to invoke scheduled flows.