Salesforce Sandboxes Quiz
202 Questions
0 Views

Salesforce Sandboxes Quiz

Created by
@DesirousJadeite2023

Questions and Answers

What are two characteristics of partial copy sandboxes versus full sandboxes? Choose 2.

  • They support more frequent refreshes (every 5 days). (correct)
  • They include all metadata but only a subset of data. (correct)
  • They are refreshed every 29 days.
  • They require a sandbox template to specify data to copy. (correct)
  • Which tool can deploy destructive changes to Apex classes in production?

  • Salesforce CLI
  • Change Set
  • Ant Migration Tool
  • Workbench (correct)
  • Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.)

  • Use methods from the 'Limits' class to monitor governor limits. (correct)
  • Use collections to store all fields from a related object and not just minimally required fields.
  • Use SOQL for loops to iterate data retrieved from queries that return a high number of rows. (correct)
  • Use variables within Apex classes to store large amounts of data.
  • Which set of roll-up types are available when creating a roll-up summary field?

    <p>COUNT, SUM, MIN, MAX</p> Signup and view all the answers

    What is the result of the debug statements in testMethod3 when you create test data using testSetup in the below code?

    <p>Account0.Phone=333-8780, Account1.Phone=333-8781</p> Signup and view all the answers

    Which three options allow a developer to use custom styling in a Visualforce page? (Choose three.)

    <p>A static resource</p> Signup and view all the answers

    Which two exceptions may occur when executing the following query in Apex to retrieve a list of contacts for each account? (Choose two.)

    <p>SOQL query row limit exception due to the number of accounts.</p> Signup and view all the answers

    Which three tools can deploy metadata to production? (Choose three.)

    <p>Metadata API</p> Signup and view all the answers

    In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? (Choose two.)

    <p>Use Schema.describeSObjects(new String[]{myObject}).fields.getMap() to return a map of fields.</p> Signup and view all the answers

    How should a developer avoid hitting the governor limits in test methods?

    <p>Use Test.startTest() to reset governor limits.</p> Signup and view all the answers

    Which three declarative fields are correctly mapped to variable types in Apex? (Choose three.)

    <p>Date/Time maps to Datetime.</p> Signup and view all the answers

    How should a developer implement the request to set a picklist field to 'Monitor' on any new Leads owned by a subnet of Users?

    <p>Create a Lead Workflow Rule Field Update.</p> Signup and view all the answers

    Why would a developer consider using a custom controller over a controller extension?

    <p>To implement all of the logic for a page and bypass default Salesforce functionality.</p> Signup and view all the answers

    What is the requirement to override a button using Visualforce on an object?

    <p>The standardController attribute must be set to the object.</p> Signup and view all the answers

    What type of exception will a trigger cause if it is intended to copy the current Email into the Prior_Email_c field any time the Email field is changed?

    <p>A DML exception</p> Signup and view all the answers

    How should a developer create a new custom exception class?

    <p>public class CustomException extends Exception{}</p> Signup and view all the answers

    Which two number expressions evaluate correctly? (Choose two.)

    <p>Decimal d = 3.14159;</p> Signup and view all the answers

    How can a developer set up a debug log on a specific user?

    <p>Set up a trace flag for the user, and define a logging level and time period for the trace.</p> Signup and view all the answers

    How can a developer create a Visualforce page that enforces Field Level Security, keeping maintenance minimal?

    <p>Use a custom controller that has the with sharing keywords.</p> Signup and view all the answers

    What are two characteristics of partial copy sandboxes versus full sandboxes? Choose 2 answers.

    <p>Supports more frequent refreshes</p> Signup and view all the answers

    Which two automation tools include a graphical designer? Choose 2 answers.

    <p>Process builder</p> Signup and view all the answers

    Which resource in the abstract component bundle allows the developer to achieve calling JavaScript code by controller functions?

    <p>Helper.js</p> Signup and view all the answers

    Which standard field is required when creating a new contact record?

    <p>LastName</p> Signup and view all the answers

    What can a developer implement to alert salespeople when an account is late making payments?

    <p>Formula field</p> Signup and view all the answers

    To which primitive data type is a text area (rich) field automatically assigned?

    <p>String</p> Signup and view all the answers

    Which two techniques should a developer use to resolve an apex trigger failure due to governor limits? Choose 2 answers.

    <p>Use maps to reference related records</p> Signup and view all the answers

    Which statement is true about developing in a multi-tenant environment?

    <p>Governor limits prevent Apex from impacting the performance of multiple tenants on the same instance.</p> Signup and view all the answers

    Which three attributes need to be defined in the apex:commandButton tag to enable the functionality of calling a web service? Choose 3.

    <p>Action</p> Signup and view all the answers

    What is the value of acctScore after processing a custom Percent field with a value of 50%?

    <p>5000</p> Signup and view all the answers

    Which three types of information can a developer see in the debug log? Choose 3.

    <p>Database changes</p> Signup and view all the answers

    What could be causing a text field to be automatically populated with invalid values despite a custom validation rule?

    <p>The field is being populated by a workflow field update</p> Signup and view all the answers

    Which two trigger types should a developer create to update an unrelated object when a record gets saved? Choose 2.

    <p>Before update</p> Signup and view all the answers

    What is the debug output of the following apex code? Decimal thevalue; system.debug(thevalue);

    <p>Null</p> Signup and view all the answers

    From which two locations can a developer determine the overall code coverage for a sandbox? Choose 2.

    <p>The tests tab of the developer console</p> Signup and view all the answers

    What can be done so that recordcount can be accessed by a test class, but not by a non-test class?

    <p>Add the testvisible annotation to recordcount</p> Signup and view all the answers

    Which three are valid controller options for a Visualforce page used as a dashboard component? Choose 3.

    <p>Use a standard controller with extensions</p> Signup and view all the answers

    What is the data type returned by the following SOSL search [FIND 'Acme*' IN NAME FIELDS RETURNING Account, Opportunity];

    <p>List</p> Signup and view all the answers

    What are two likely causes of users in the 'Sales Representative' role not being able to access the Licensed Professional records? Choose 2.

    <p>The organization has a private sharing model for Certification_c, and Contact is the primary relationship in the Licensed_Professional_c object.</p> Signup and view all the answers

    What is the appropriate publish/subscribe logic to notify an external system of an unhandled exception instead of sending emails directly from Salesforce?

    <p>Publish the error event using the Eventbus.publish() method and have the external system subscribe to the event using CometD.</p> Signup and view all the answers

    Why did the test method fail in the sandbox and pass in the Developer Console?

    <p>The test method relies on existing data in the sandbox.</p> Signup and view all the answers

    Based on the following code snippet, what is the value of x?

    <p>4</p> Signup and view all the answers

    Which Visualforce feature supports displaying a Visualforce page that allows users to edit multiple records?

    <p>RecordSetVar page attribute</p> Signup and view all the answers

    How should a developer prevent a cross-site scripting vulnerability when taking an ID as a URL parameter?

    <p>ApexPages.currentPage().getParameters().get('url_param').escapeHtml4()</p> Signup and view all the answers

    Which tool should a development team use to deploy to a sandbox during their development cycles?

    <p>Ant Migration Tool</p> Signup and view all the answers

    Which statements are true regarding governor limits in the execute() method of a Batchable interface? Choose 2 answers.

    <p>The Apex governor limits might be higher due to the asynchronous nature of the transaction.</p> Signup and view all the answers

    Which method is used to fire an application event that follows the traditional publish-subscribe model?

    <p>Fire()</p> Signup and view all the answers

    When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

    <p>Dev Hub</p> Signup and view all the answers

    Which SOSL statement should the developer use to retrieve Contacts and Users with the email address '[email protected]'?

    <p>FIND {<a href="mailto:[email protected]">[email protected]</a>} IN Email Fields RETURNING Contact (Email), User (Email)</p> Signup and view all the answers

    How should the Order Number field be defined in Salesforce when importing order records?

    <p>Number with External ID</p> Signup and view all the answers

    What are three considerations when using the @InvocableMethod annotation in Apex? Choose three.

    <p>A method using the @InvocableMethod annotation can be declared as Public or Global.</p> Signup and view all the answers

    What approach should a developer use to back up all data and attachments in Salesforce once a month?

    <p>Define a Data Export scheduled job.</p> Signup and view all the answers

    What type of relationship should be used if financial representatives are allowed to see information on the Order but not on the Line items?

    <p>Master Detail</p> Signup and view all the answers

    What are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers.

    <p>Self-contained and reusable units of an application</p> Signup and view all the answers

    What is the maximum number of SOQL queries used by a specific code?

    <p>6</p> Signup and view all the answers

    What technique should be implemented to prevent exceeding the platform governor limit for SOQL queries?

    <p>Refactor the code to perform only one SOQL query, filtering by the Set of opportunityIds.</p> Signup and view all the answers

    Which process automation should be used to send an outbound message without using Apex code?

    <p>Workflow Rule</p> Signup and view all the answers

    What should a developer do to ensure the required field values are available to test a new Apex class?

    <p>Use Test.loadData() and reference a CSV file in a static resource.</p> Signup and view all the answers

    Which method should a developer use to calculate the estimated ship date for an Order based on the availability date of Line Items?

    <p>Use a Max Roll-Up Summary field on the Latest availability date fields.</p> Signup and view all the answers

    What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?

    <p>Use the with sharing keyword on the class declaration.</p> Signup and view all the answers

    What are two ways the developer can update the method to prevent a SOQL injection attack?

    <p>Use variable binding and replace the dynamic query with a static SOQL.</p> Signup and view all the answers

    What are three ways for a developer to execute tests in an org?

    <p>Tooling API</p> Signup and view all the answers

    When the method is called from a trigger, how can the developer determine if the code is executed in a trigger context?

    <p>Check if Trigger.isExecuting ==true.</p> Signup and view all the answers

    Which collection type provides unique key/value pairings of data?

    <p>Map</p> Signup and view all the answers

    What can a developer use to determine if the core Apex code exceeds any governor limits in a test class during bulk execution?

    <p>Limits, startTest, stopTest</p> Signup and view all the answers

    What are two features of Heroku Connect?

    <p>Near Real Time Sync between Heroku Postgres and Salesforce.</p> Signup and view all the answers

    What should the negative tests for a method that calculates a person's age based on birth date include?

    <p>Assert that future dates are rejected by the method.</p> Signup and view all the answers

    What additional steps should the developer take when using the With Sharing keyword for a Visualforce Page accessed by Sales Managers?

    <p>Create one Profile, one Permission Set, and two Roles.</p> Signup and view all the answers

    When would the use of Heroku Postgres be appropriate?

    <p>To store and retrieve data using the Structured Query Language.</p> Signup and view all the answers

    How can a custom type be identified as unique when added to a Set?

    <p>The class must implement the Equals and Hashcode methods.</p> Signup and view all the answers

    How should a developer ensure that a new case is created for the support team when an opportunity stage changes to 'Closed Won'?

    <p>Create a Process Builder to create the new case.</p> Signup and view all the answers

    What are two valid options for iterating through each Account in the collection List named AccountList?

    <p>For (Integer i=0; i &lt; AccountList.size(); i++) {...}</p> Signup and view all the answers

    Which line of code is causing the code block to fail?

    <p>Line-03: A SOQL query is located inside of the for loop code.</p> Signup and view all the answers

    What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?

    <p>Create a process with Process Builder.</p> Signup and view all the answers

    Which requirement needs to be implemented by using standard workflow instead of Process Builder?

    <p>Send an outbound message without Apex code.</p> Signup and view all the answers

    What can be done to resolve test failures after a new validation rule is added to the Account object?

    <p>Create a method that loads valid Account records from a Static Resource, and call this method within test methods.</p> Signup and view all the answers

    Which component is available to deploy using Metadata API?

    <p>Account Layout</p> Signup and view all the answers

    In the code below, what type does Boolean inherit from? Boolean b= true;

    <p>Object</p> Signup and view all the answers

    What is the preferred way to reference web content such as images, style sheets, JavaScript, and other libraries that is used in Visualforce pages?

    <p>By uploading the content as a Static Resource.</p> Signup and view all the answers

    What kind of relationship would a developer use to relate the Account to the Warehouse?

    <p>Lookup</p> Signup and view all the answers

    What happens when a user updates a record with an Apex update trigger and a Workflow Rule?

    <p>The Apex Trigger is fired more than once.</p> Signup and view all the answers

    What is true for a partial sandbox that is not true for a full sandbox?

    <p>Limited to 5 GB of data.</p> Signup and view all the answers

    In which order does Salesforce execute events upon saving a record?

    <p>Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit</p> Signup and view all the answers

    What happens to the values in CampaignMember.Estimated_value_c when aggregating for Total_estimated_value_c?

    <p>The values in CampaignMember.Estimated_value_c are converted into the currency of the Campaign record and the sum is displayed using the currency on the Campaign record.</p> Signup and view all the answers

    What can the administrator do to associate an application with each job posting in the schema for the organization?

    <p>Create a master-detail relationship in the Application custom object to the Job Postings custom object.</p> Signup and view all the answers

    What is a characteristic of the Lightning Component Framework?

    <p>It includes responsive components.</p> Signup and view all the answers

    What is a capability of cross-object formula fields?

    <p>Formula fields can expose data the user does not have access to in a record.</p> Signup and view all the answers

    How can a developer debug code in the Developer Console?

    <p>Open the logs tab in the Developer Console.</p> Signup and view all the answers

    Which data structure is returned to a developer when performing a SOSL search?

    <p>A list of lists of sObjects.</p> Signup and view all the answers

    How can a developer avoid exceeding governor limits when using an Apex Trigger?

    <p>By performing DML transactions on lists of SObjects.</p> Signup and view all the answers

    What is a correct pattern to follow when programming in Apex on a multi-tenant platform?

    <p>Queries select the fewest fields and records possible to avoid exceeding governor limits.</p> Signup and view all the answers

    What should a developer working in a sandbox use to exercise a new test Class before the developer deploys that test production?

    <p>The Test menu in the Developer Console.</p> Signup and view all the answers

    What can a developer do to automatically send candidate information to a third-party human resource system when a candidate is hired?

    <p>Create a workflow rule with an outbound message action.</p> Signup and view all the answers

    What is an accurate statement about the with sharing keyword?

    <p>Both inner and outer classes can be declared as with sharing.</p> Signup and view all the answers

    How can a developer refer to or instantiate a PageReference in Apex?

    <p>By using a PageReference with a partial or full URL.</p> Signup and view all the answers

    Which standard field needs to be populated when a developer inserts new Contact records programmatically?

    <p>LastName</p> Signup and view all the answers

    What can a developer do to successfully deploy a new Visualforce page and extension with 95% coverage but face an average test coverage warning?

    <p>Add test methods to existing test classes from previous deployments.</p> Signup and view all the answers

    Which type of trigger would the developer create to automatically populate the Reports To field in a Contact record based on related Account and Department fields?

    <p>Before insert</p> Signup and view all the answers

    To which primitive data type in Apex is a currency field atomically assigned?

    <p>Decimal</p> Signup and view all the answers

    Which resource can be included in a Lightning Component bundle?

    <p>Apex class</p> Signup and view all the answers

    Which statement can a developer use to throw a custom exception 'RecordNotFoundException'? (Choose 2)

    <p>Throw new RecordNotFoundException()</p> Signup and view all the answers

    When creating unit tests in Apex, which statement is accurate? (Choose 2)

    <p>System Assert statements that do not increase code coverage contribute important feedback in unit tests.</p> Signup and view all the answers

    What is a valid Apex statement?

    <p>Account[] acctList = new List{new Account()}</p> Signup and view all the answers

    Which statement is unnecessary inside the unit test for the custom controller? (Choose 3)

    <p>Test.setCurrentPage(pageRef)</p> Signup and view all the answers

    Which action can the developer perform to get record types and picklist values in the controller for a Case object? (Choose 2)

    <p>Use Schema.PicklistEntry returned by Case Status getDescribe().getPicklistValues()</p> Signup and view all the answers

    How can a developer accomplish syncing Status_c fields between Application_c and Position_c?

    <p>By using an Apex trigger with a DML operation.</p> Signup and view all the answers

    How can a developer access the incoming records in a before insert trigger?

    <p>By accessing the Trigger.new context variable.</p> Signup and view all the answers

    How many accounts are in the org after the code execution?

    <p>100</p> Signup and view all the answers

    What is the recommended way to display field data from related Review_C records on a Visualforce page for a single Position_c record?

    <p>Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.</p> Signup and view all the answers

    Which of the following statements are correct regarding the Force.com IDE? (Choose 2)

    <p>Edit metadata components.</p> Signup and view all the answers

    Which code segment can be used to control when the dowork() method is called?

    <p>If(Trigger.isInsert) dowork();</p> Signup and view all the answers

    When would a developer use a custom controller instead of a controller extension? (Choose 2)

    <p>When a Visualforce page does not reference a single primary object.</p> Signup and view all the answers

    What is a valid statement about Apex classes and interfaces? (Choose 2)

    <p>Exception classes must end with the word exception.</p> Signup and view all the answers

    What happens after the trigger code block executes that creates child Cases upon parent Case creation?

    <p>Child case is created for each parent case in Trigger.new.</p> Signup and view all the answers

    Which control statement should a developer use to implement a set of code that executes for every record in a recordset, without performing a.size() or.length() method call?

    <p>For (variable : list_or_set) { }</p> Signup and view all the answers

    What is the result when a Visualforce page calls an Apex controller, which then hits a governor limit?

    <p>Any changes up to the error are rolled back.</p> Signup and view all the answers

    What code segment should be inserted to make the value of the class variable SalesTax accessible within the trigger?

    <p>PaymentTax.SalesTax</p> Signup and view all the answers

    How should a developer retrieve a record by ID passed on the URL in a Visualforce page with a custom controller?

    <p>Use the constructor method for the controller.</p> Signup and view all the answers

    Where can debug log filter settings be set? (Choose 2)

    <p>The Filters link by the monitored user's name within the web UI.</p> Signup and view all the answers

    Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?

    <p>The Custom Object will be deleted when the referenced Standard Object is deleted.</p> Signup and view all the answers

    On which object can an administrator create a roll-up summary field?

    <p>Any object that is on the master side of a master-detail relationship.</p> Signup and view all the answers

    What is the result of the following code block when executed: List acc = [SELECT Id FROM Account LIMIT 10]; Delete acc; Database.emptyRecycleBin(acc); system.debug(Limits.getDMLStatements()+ ', ' +Limits.getLimitDMLStatements());

    <p>2, 150</p> Signup and view all the answers

    What are the supported content sources for custom buttons and links? (Choose 2 Answers)

    <p>URL.</p> Signup and view all the answers

    What action types should be configured to display a custom success message?

    <p>Update a record.</p> Signup and view all the answers

    When creating a record with a Quick Action, what is the easiest way to post a feed item?

    <p>By selecting create feed item on the quick action.</p> Signup and view all the answers

    What is the easiest way to verify a user before showing them sensitive content?

    <p>Calling the generateVerificationUrl method in Apex.</p> Signup and view all the answers

    What features are available when writing Apex test classes? (Choose 2 Answers)

    <p>The ability to select testing data using CSV files stored in the system.</p> Signup and view all the answers

    Which two number expressions evaluate correctly? (Choose 2 answers)

    <p>Decimal D = 3.14159;</p> Signup and view all the answers

    What attributes should the visualforce page include to implement controller functionality with myControllerExtension?

    <p>StandardController = 'case' and extensions = 'myControllerExtension'</p> Signup and view all the answers

    What step should be taken before putting an app into production?

    <p>Run the production check feature via the web interface.</p> Signup and view all the answers

    Where should client-side logic that executes on hover over an account be stored in a lightning component?

    <p>AccountList.renderer</p> Signup and view all the answers

    Which method annotation should be used to create records for every method in the test class?

    <p>@TestSetup</p> Signup and view all the answers

    What is a valid expression for the provided code block regarding number declaration?

    <p>For(x=0; x &lt; INT_MAX; x++)</p> Signup and view all the answers

    Which two queries can a developer use in a Visualforce controller to protect against SOQL injection vulnerabilities? (Choose 2 answers)

    <p>String qryName = '%' + String.escapeSingleQuotes(name) + '%'; String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :qryName'; List queryResults = Database.query(qryString);</p> Signup and view all the answers

    What is the return data type when ApexPages.currentPage().getParameters() is used to retrieve URL parameters from a Visualforce controller?

    <p>Map</p> Signup and view all the answers

    Which method should a developer use to search for a phone number that could be on multiple object types?

    <p>SOSL Query that includes ALL ROWS</p> Signup and view all the answers

    What is an accurate statement about the 'with sharing' keyword? (Choose 2 answers)

    <p>Inner classes inherit the sharing settings from the container class.</p> Signup and view all the answers

    What must the Controller for a Visualforce page utilize to override the standard Opportunity view button?

    <p>The Opportunity StandardController for pre-built functionality.</p> Signup and view all the answers

    When the value of a field of an account record is updated, which method will update the value of a custom field on an opportunity? (Choose 2 answers)

    <p>An Apex trigger on the Account object.</p> Signup and view all the answers

    What approach helps ensure quality data? (Choose 3 answers)

    <p>Page layouts</p> Signup and view all the answers

    What is true of a partial sandbox that is not true of a full sandbox? (Choose 2 answers)

    <p>Limited to 5 GB of data</p> Signup and view all the answers

    In the Lightning component framework, which resources can be used to fire events? (Choose 2 answers)

    <p>Third-party Javascript code</p> Signup and view all the answers

    What is the advantage of Salesforce Lightning?

    <p>Pre-defined components to give Standard Look and Feel</p> Signup and view all the answers

    What are two considerations for deciding to use a roll-up summary field? (Choose 2 answers)

    <p>Roll-up summary fields do not cause validation rules on the parent object unless that object is edited separately.</p> Signup and view all the answers

    Which statement results in an Apex compiler error?

    <p>List s = List{<code>a',</code>b',`c');</p> Signup and view all the answers

    What are two benefits of the Lightning Component framework? (Choose two.)

    <p>It promotes faster development using out-of-box components that are suitable for desktop and mobile devices.</p> Signup and view all the answers

    A method is passed a list of generic sObjects as a parameter. What should the developer do to determine which object type to cast each sObject?

    <p>Use the getSObjectType method on each generic sObject to retrieve the sObject token.</p> Signup and view all the answers

    What should a developer use to implement an automatic Approval Process submission for Cases?

    <p>Process Builder</p> Signup and view all the answers

    When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items. What should a developer do to meet this requirement?

    <p>Create a roll-up summary field on the Quote object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.</p> Signup and view all the answers

    While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org. How should the Developer overcome this problem?

    <p>Use Test.getStandardPricebookId() to get the standard PriceBook ID.</p> Signup and view all the answers

    Which two Apex data types can be used to reference a Salesforce record ID dynamically? (Choose two.)

    <p>ENUM</p> Signup and view all the answers

    Where can a developer identify the time taken by each process in a transaction using Developer Console log inspector?

    <p>Timeline tab under Execution Overview panel</p> Signup and view all the answers

    Which two platform features align to the Controller portion of MVC architecture? (Choose two.)

    <p>Workflow rules</p> Signup and view all the answers

    A developer needs to test an Invoicing system integration. Which two environments meet the requirements for testing? (Choose two.)

    <p>Full Sandbox</p> Signup and view all the answers

    Which approach should a developer take to automatically add a 'Maintenance Plan' to each Opportunity that includes an 'Annual Subscription' when an opportunity is closed?

    <p>Build an Opportunity trigger that adds an OpportunityLineItem record.</p> Signup and view all the answers

    Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)

    <p>The @testSetup annotation is not supported when the @IsTest(SeeAllData=True) annotation is used.</p> Signup and view all the answers

    What is the requirement for a class to be used as a custom Visualforce controller?

    <p>Any top-level Apex class that implements the controller interface.</p> Signup and view all the answers

    A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The Visualforce page should include which attribute(s) to correctly implement controller functionality?

    <p>standardController='Case' and extensions='myControllerExtension'</p> Signup and view all the answers

    What should the developer consider when working with multiple triggers on the case object?

    <p>Trigger execution order is not guaranteed for the same sObject.</p> Signup and view all the answers

    How should a developer prevent a recursive trigger?

    <p>Use a static Boolean variable.</p> Signup and view all the answers

    Which three options can be accomplished with formula fields? (Choose three.)

    <p>Generate a link using the HYPERLINK function to a specific record.</p> Signup and view all the answers

    What is a capability of the ltng:require tag that is used for loading external Javascript libraries in Lightning Component?

    <p>Loading scripts in parallel.</p> Signup and view all the answers

    Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.)

    <p>Execute a SOQL query on the RecordType object.</p> Signup and view all the answers

    Which code block will run successfully in an execute anonymous window?

    <p>myFooController m = new myFooController(); System.assert(m.prop == null);</p> Signup and view all the answers

    In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?

    <p>As a String with each value separated by a semicolon.</p> Signup and view all the answers

    What are two valid options for iterating through each Account in the collection List named AccountList? (Choose two.)

    <p>for (Integer i = 0; i &lt; AccountList.size(); i++) {...}</p> Signup and view all the answers

    What are three valid Apex loop structures for iterating through items in the collection? (Choose three.)

    <p>for (Account accountRecord : accountMap.keySet()) {...}</p> Signup and view all the answers

    Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage. Which two strategies should a developer use to accomplish this? (Choose two.)

    <p>Use a validation rule.</p> Signup and view all the answers

    How should a developer make sure that a child record on a custom object has the same sharing access as its associated account?

    <p>Ensure that the relationship between the objects is Master-Detail.</p> Signup and view all the answers

    Given the query: List accounts = [SELECT ID, (SELECT ID, Name from Contacts) FROM Account WHERE Name = 'NoContacts']; What is the result of running this Apex?

    <p>accounts.contacts is an empty Apex.</p> Signup and view all the answers

    Which three attributes need to be defined with values in the apex:button tag to accomplish the functionality? (Choose three.)

    <p>extensions</p> Signup and view all the answers

    Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class. What is the end result?

    <p>The API name of the field is changed, and a warning is issued to update the class.</p> Signup and view all the answers

    When is an Apex Trigger required instead of a Process Builder Process?

    <p>When an action needs to be taken on a delete or undelete, or before a DML operation is executed.</p> Signup and view all the answers

    What action will allow the developer to relate records in the data model without knowing the Salesforce ID?

    <p>Create and populate a custom field on the parent object marked as an External ID.</p> Signup and view all the answers

    How should a developer design the Apex classes for a Lightning component?

    <p>Have each class implement an interface that defines method getTextSummary() that returns the summary.</p> Signup and view all the answers

    Which approach should a developer use to add pagination to a Visualforce page?

    <p>A StandardSetController</p> Signup and view all the answers

    Which two ways should a developer create a PDF quote document formatted using the company's branding guidelines?

    <p>Create a Visualforce page with custom styling.</p> Signup and view all the answers

    Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses?

    <p>Workbench REST Explorer</p> Signup and view all the answers

    What should the developer do to deploy a Visualforce page and a custom controller with methods to handle different buttons?

    <p>Create a test class that provides coverage of the custom controller.</p> Signup and view all the answers

    What is a benefit of using an after insert trigger over using a before insert trigger?

    <p>An after insert trigger allows a developer to insert other objects that reference the new record.</p> Signup and view all the answers

    What should a developer do to manage the usage and maintenance of machinery assigned to different construction jobs?

    <p>Create a lookup field on the Construction Job object to the Machinery object.</p> Signup and view all the answers

    What is the correct definition of the Apex method in a Next Best Action strategy?

    <p>@InvocableMethod global Recommendation getLevel(ContactWrapper input) { }</p> Signup and view all the answers

    What is an approach a developer can take to streamline maintenance of picklists with values 'High', 'Medium', and 'Low'?

    <p>Create the Picklist on each object and use a Global Picklist Value Set containing the values.</p> Signup and view all the answers

    Which relationship implementation supports calculating the total amount on an Order and moving Line Items to a different Order?

    <p>Line Items has a Master-Detail field to Order and the Master can be re-parented.</p> Signup and view all the answers

    What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface?

    <p>View the Apex Jobs page</p> Signup and view all the answers

    What should be used to create scratch orgs?

    <p>Salesforce CLI</p> Signup and view all the answers

    Which is the correct definition of the Apex method that gets additional information in a Visual Flow?

    <p>@InvocableMethod(label='Additional Info') public static List getInfo(List contactIds) { }</p> Signup and view all the answers

    What should a developer do to test if a Contact trigger works correctly without changing the organization's data?

    <p>Use the Test menu on the Developer Console to run all test classes for the Contact trigger.</p> Signup and view all the answers

    Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than $10,000?

    <p>Workflow Rule</p> Signup and view all the answers

    What is the correct definition of the Apex method for determining a discount level in a Next Best Action strategy?

    <p>@InvocableMethod global static List getLevel(List input) { }</p> Signup and view all the answers

    What should a developer do to correct the display issue of the account type field in a Visualforce page?

    <p>Add a getter method for the actType attribute.</p> Signup and view all the answers

    Which implementation of a CreditcardPayment class is correct given the Payment class structure?

    <p>Public class CreditcardPayment extends Payment { public override void makePayment(Decimal amount) { } }</p> Signup and view all the answers

    What field should the developer add to the Global Address object for efficient model support of multiple Accounts sharing a default pickup address?

    <p>Add a Master-Detail field on the Global Address object to the Account object.</p> Signup and view all the answers

    Why was a change from Master-Detail to Lookup relationship not permitted for the Vendor custom object?

    <p>The Account records contain Vendor roll-up summary fields.</p> Signup and view all the answers

    What should the developer do to successfully deploy an Apex trigger with 0% test coverage?

    <p>Create a test class and methods to cover the Apex trigger.</p> Signup and view all the answers

    How should a custom user interface be provided when a user edits an Account in Lightning Experience?

    <p>Override the Account's Edit button with Lightning component.</p> Signup and view all the answers

    Which technique should a developer implement to ensure transaction control and avoid exceeding governor limits when performing resource-intensive operations?

    <p>Use the Database.Savepoint method to enforce database integrity.</p> Signup and view all the answers

    Which method should a developer use to ensure only users with permission can delete Accounts?

    <p>Schema.sObjectType.Account.isDeletable()</p> Signup and view all the answers

    Which two operations can be performed using a formula field?

    <p>Calculating a score on a Lead based on the information from another field.</p> Signup and view all the answers

    What is the most efficient way to ensure a value is selected for the Food_Preference_c picklist every time a record is saved?

    <p>Mark the field as Required on the field definition.</p> Signup and view all the answers

    Where can a developer find information about the status of asynchronous or future calls?

    <p>Apex Jobs</p> Signup and view all the answers

    Which three web technologies can be integrated into a Visualforce page?

    <p>HTML</p> Signup and view all the answers

    How should the developer declare an integer variable called maxAttempts to preserve its value across trigger executions?

    <p>Declare maxAttempts as a private static variable on a helper class.</p> Signup and view all the answers

    Study Notes

    Sandbox Types

    • Partial Copy Sandboxes require a sandbox template to determine specific data to copy.
    • They allow more frequent refreshes every 5 days compared to Full Sandboxes, which refresh every 29 days.
    • Partial Copy Sandboxes include all metadata but only a selected subset of data as per the sandbox template.

    Deployment Tools

    • Workbench is capable of deploying destructive changes to Apex classes in production.
    • It utilizes the Metadata API to perform actions like deletions on metadata, showcasing its utility for managing changes in production environments.

    Certification Exam Success Tips

    • Utilize practice questions and answers specifically designed for exam preparation; sharing these is prohibited.
    • Joining the customer support Telegram group provides benefits like instant responses, professional support, and the latest product updates.

    Salesforce Certification: Platform Developer I

    • Exam Code: PDI; composed of 719 questions, divided into six parts.
    • Knowledge of Salesforce API, data models, and coding standards is essential for passing.

    Sandbox Environments

    • Partial Copy Sandboxes: Include a subset of metadata and support more frequent refreshes (Correct answers: C, D).
    • Full Sandboxes: Contain complete copies of production orgs, suitable for extensive testing.

    Automation Tools

    • Flow Builder and Process Builder both feature graphical design tools (Correct answers: B, C).
    • Understanding these tools is crucial for automating business processes without code.

    Code and Triggers

    • Use Helper.js for shared JavaScript functions in components (Correct answer: D).
    • The required standard field for a new contact record is LastName (Correct answer: A).
    • To avoid exceeding governor limits in triggers, utilize maps and lists (Correct answers: B, D).

    Data Types and Fields

    • A text area (rich) field is assigned the String data type (Correct answer: D).
    • Validation rules can prevent entries but might be bypassed if updated by workflows (Correct answer: A).

    Visualforce and Apex

    • To create a visualforce button, the attributes StandardController, Extensions, and Action must be set (Correct answers: A, B, C).
    • A custom visualforce page can be built using various controllers, including custom and standard controllers with extensions (Correct answers: A, C, E).

    Testing and Debugging

    • Debug logs can show database changes and time-based workflow actions (Correct answers: B, D, E).
    • The outcome of Apex test methods may differ between the Developer Console and sandbox due to reliance on existing data (Correct answer: B).

    Relationships and Security

    • Master-Detail relationships enforce strict sharing settings, applicable for orders and line items (Correct answer: D).
    • Use a Global Picklist Value Set for standardized values across multiple objects to ease maintenance (Correct answer: A).

    Best Practices in Apex

    • Methods using the @InvocableMethod annotation must be static and can be public/global (Correct answers: A, B, E).
    • A scheduled Data Export job offers a reliable backup solution for data and attachments monthly (Correct answer: D).

    Optimization Techniques

    • Ensure governor limits are adhered to by executing SOQL queries efficiently, limiting the number based on specific conditions (Correct answer: D).
    • Outbound messages can be sent without Apex code by using a Workflow Rule (Correct answer: A).

    Additional Key Points

    • Users with "Sales Representative" roles may not access certain records due to sharing settings or role restrictions (Correct answers: A, C).
    • Design principles for Apex methods invoked by Next Best Action should follow proper structure and visibility requirements (Correct answer: B).### Developer Tools and Features
    • Enqueued job status can be checked through the Apex Status Page and Apex Jobs page.
    • Scratch orgs are created using Salesforce CLI.
    • Visual Flow can call an Apex method, defined with the @InvocableMethod annotation, to fetch additional information about Contacts.
    • Testing a trigger can be done by running all test classes via the Test menu in the Developer Console.

    Email Notifications and Process Automation

    • Email notifications for an Opportunity's amount change can be triggered using Workflow Rules, Flows, and Process Builder.

    Apex Method Definitions

    • The correct definition for an Apex method invoked in Flow should use a List as a return type.
    • Proper syntax and naming conventions, such as @InvocableMethod(label='Additional Info'), are crucial for method definitions.

    Debugging Apex Triggers

    • A trigger's correctness can be verified without altering data by running test classes, ensuring at least 1% coverage.

    Salesforce Object Relationships

    • To enable multiple Accounts to share a default pickup address, a Master-Detail relationship should be created from the Global Address object to the Account object.

    Apex Class Relationships

    • Changing Master-Detail relationships to Lookup relationships can be restricted by existing roll-up summary fields.

    Deployment Best Practices

    • Successful deployment requires achieving coverage of both the trigger and the accompanying helper class, often necessitating the creation of dedicated test classes.

    User Interface in Lightning Experience

    • Custom user interfaces for editing records can be realized by overriding the Edit button with Lightning components.

    Handling Apex Transactions

    • When executing resource-intensive actions, using Database.Savepoint ensures transaction integrity, while System.Limit helps monitor governor limits.

    Security in Apex Methods

    • Governance in account deletion methods should ensure only authorized users can make deletions using Schema.sObjectType.Account.isDeletable().

    Formula Fields

    • Formula fields can display calculated data, such as images or scores, based on record criteria.

    Required Field Validation

    • To ensure a picklist field always has a value, it should be marked as Required in its field definition.

    SOQL Injection Prevention

    • Preventing SOQL injection can be achieved through variable binding in dynamic queries and sanitizing input parameters.

    Testing and Execution

    • Tests can be executed in Salesforce through the Setup Menu, Developer Console, and using the Tooling API.

    Data Structures in Apex

    • Apex uses collections, with Maps allowing unique key/value pairings, while Lists and Sets provide ordered and unique data storage.

    Debugging Governor Limits

    • To monitor governor limits during test execution, utilize Limits, startTest, and stopTest methods effectively.

    Heroku Connect Features

    • Heroku Connect provides real-time synchronization between Salesforce and Postgres databases along with bidirectional syncing abilities.

    These notes encapsulate key functions, best practices, and concepts that developers need to understand in Salesforce development.### Near Real Time Sync between Heroku Postgres and Salesforce

    • Heroku Postgres is suitable for organizing and retrieving data via Structured Query Language (SQL).

    Unit Testing for Age Calculation Method

    • Negative unit tests should verify that future dates are rejected (correct answer A).

    Visualforce Page and Apex Controller with Sharing

    • With Sharing keyword restricts visibility; only Accounts owned by Reporting Sales Representatives should be available.
    • Required configuration involves creating one Profile, one Permission Set, and two Roles (correct answer C).

    Custom Types and Sets

    • To ensure uniqueness of custom types in a Set, the class must implement the Equals and Hashcode methods (correct answer B).

    Creating Cases from Opportunities

    • Use Process Builder to automatically create a support Case when an Opportunity stage is changed to 'Closed Won' (correct answer A).

    Iterating through List of Accounts

    • Valid options for iterating a List named AccountList include using:
      • For loop with Account as the variable (correct answer B).
      • Using indexes in a loop to access accounts.

    Identifying Failing Code in Triggers

    • A SOQL query within a for loop leads to failure (correct answer A).

    Field Updates through Process Builder

    • Utilize Process Builder to update a picklist field on related Opportunity records when changes in Account are detected (correct answer A).

    Standard Workflow vs. Process Builder

    • Standard Workflow is preferred for sending outbound messages without Apex and copying account addresses (correct answers B and C).

    Handling Validation Rule Failures

    • Create methods that load valid Account records or instantiate them for testing to reduce future code changes (correct answers A and B).

    Deployable Components via Metadata API

    • Case Layout and Account Layout can be deployed using Metadata API (correct answers A and B).

    Boolean Data Type in Apex

    • Boolean inherits from the Object data type (correct answer B).

    Referencing Web Content in Visualforce

    • Preferred method for referencing web content is to upload it as a Static Resource (correct answer D).

    Lookup Relationships for Custom Objects

    • A lookup relationship should be established between Warehouse and Account custom objects (correct answer B).

    Trigger Execution with Workflow Rules

    • An Apex Trigger will execute more than once if a corresponding Workflow Rule is triggered (correct answer D).

    Characteristics of Partial Sandboxes

    • Partial sandboxes allow more frequent refreshes and are limited to 5 GB of data (correct answers A and D).

    Salesforce Event Execution Order

    • The correct execution order is: Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit (correct answer A).

    Roll-Up Summary Field with Multi-Currency

    • When utilizing a roll-up summary field in a multi-currency scenario, values are converted to the Campaign's currency before summation (correct answer A).

    Associating Applications with Job Postings

    • Use a master-detail relationship in the Application record to connect it to Job Postings (correct answer C).

    Characteristics of Lightning Component Framework

    • Includes event-driven architecture and supports responsive components (correct answers A and C).

    Cross-Object Formula Fields

    • Cross-object formula fields can reference parent relationship fields, but can't expose data the user doesn't have access to (correct answers A, B, E).

    Debugging in Developer Console

    • Access debug logs for analyzing Apex code execution (correct answer D).

    SOSL Search Results Structure

    • A SOSL search returns a list of lists of sObjects (correct answer A).

    Avoiding Governor Limits in Apex

    • Use Maps to store query results and perform DML transactions on lists of sObjects to prevent hitting governor limits (correct answers C and D).

    Programming Patterns in Apex

    • Queries should select the fewest fields and records to minimize governor limits (correct answer C).

    Pre-deployment Testing in Sandbox

    • Use Apex Test Execution page and Test menu in the Developer Console for testing before deployment (correct answers B and C).

    Sending Candidate Information Automatically

    • A workflow rule with an outbound message action can automate sending candidate information to a third-party system (correct answer D).

    Sharing Settings in Apex

    • Inner classes do not inherit sharing settings from outer classes (correct answers A and B).

    PageReference in Apex

    • Instantiate PageReference using page names or URLs (correct answers A and B).

    Required Fields when Inserting Contacts

    • The Name field must be populated when inserting Contact records programmatically (correct answer C).

    Deploying with Test Coverage

    • To address deployment test coverage, add new test methods to existing classes from previous deployments (correct answer C).

    Auto-Populating Fields in Triggers

    • Use before insert and before update triggers to automatically populate related fields (correct answers A and C).

    Assigning Currency Fields in Apex

    • A currency field is atomically assigned to the Decimal data type in Apex (correct answer B).

    Resources in Lightning Component Bundle

    • JavaScript and documentation can be included in a Lightning Component bundle (correct answers C and D).

    Throwing Custom Exceptions

    • To throw a custom exception in Apex, use constructor methods to specify messages (correct answers A and B).

    Unit Test Characteristics in Apex

    • Assertions in unit tests provide essential feedback beyond just increasing code coverage (correct answer D).

    Valid Apex Statement

    • Declaring an Account as an array of Account objects is a valid statement (correct answer B).

    Unnecessary Statements in Unit Tests for Controllers

    • Statements related to parameters setting and inserting page references are unnecessary in unit tests for desktop controllers (correct answers B, C, D).

    Displaying Record Types and Picklist Values

    • Use Schema methods to retrieve record types and picklist values for objects (correct answers A and B).

    Automating Field Updates through Triggers

    • An Apex trigger is suitable for updating fields automatically based on related object changes (correct answer C).

    Accessing Incoming Records in Trigger Bodies

    • The incoming records in a trigger can be accessed using the Trigger.new context variable (correct answer A).

    Final Account Count After Insertion Code Execution

    • After executing a code that attempts to insert multiple Accounts, the total number remains at 100 due to the DML limit (correct answer B).
    • A controller extension can be utilized to query related records from a standard controller for display purposes (correct answer B).

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge on Salesforce's partial copy sandboxes compared to full sandboxes. This quiz covers key characteristics, including data copying processes and refresh rates. Understand the intricacies of Salesforce sandbox environments.

    More Quizzes Like This

    Salesforce Data Architect Flashcards
    54 questions
    Salesforce Apex Developer Practices
    28 questions
    Salesforce Sandbox Types and Deployment Tools
    10 questions
    Sandbox Types and Deployment Tools
    5 questions
    Use Quizgecko on...
    Browser
    Browser