Salesforce Platform Developer I

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

How can a developer avoid exceeding governor limits when using Apex Triggers? (Choose 2) A. By using a helper class that can be invoked from multiple triggers B. By using Maps to hold data from query results C. By using the Database class to handle DML transactions D. By performing DML transactions on a list of sObjects.

B. By using Maps to hold data from query results D. By performing DML transactions on a list of sObjects.

How can a developer determine, from the DescribeSObjectResult, if the current user will be able to create records for an object in Apex? A. By using the isInsertable() method. B. By using the isCreatable() method. C. By using the hasAccess() method. D. By using the canCreate() method.

B. By using the isCreatable() method.

Which actions can a developer perform using the Schema Builder? Choose 2 answers A. Create a custom field and automatically add it to an existing page layout. B. Create a view containing only standard and system objects. C. Create a custom object and define a lookup relationship on that object D. Create a view of objects and relationships without fields

B. Create a view containing only standard and system objects. C. Create a custom object and define a lookup relationship on that object

A SOAP message needs to be sent to a static end point when an Opportunity achieves the stage "Closed Won." The message should contain the Opportunity's Name, Id, Amount, and Account Id. What is the optimal solution to meet this requirement? A. Create a custom button for the Opportunity page layout that calls an Apex webservice method to send the SOAP message. B. Create a workflow rule to execute when an Opportunity record meets the criteria. The workflow rule should execute an immediate action to send an outbound message to the specified end-point. C. Create a Process to execute when an Opportunity record meets the criteria. The Process should execute an immediate action to call an Apex class to construct and send the SOAP message. D. Create an autolaunched flow that is invoked from a trigger. Define one step on the flow to construct the SOAP message and a second step to send the message.

B. Create a workflow rule to execute when an Opportunity record meets the criteria. The workflow rule should execute an immediate action to send an outbound message to the specified end-point.

A developer needs to change the value of the name field of an Account record by appending "- previously Deleted" when an Account record is restored from the Recycle Bin. How can the developer accomplish this? A. Define a before undelete Trigger. B. Define an after undelete Trigger. C. Define a workflow field update to update the Name field. D. Define a Process to update the Name field.

B. Define an after undelete Trigger.

What is a true statement about a Debug log? (Choose two correct answers.) A. A Debug log can only be defined for the developer. B. Each Debug log must be 5MB or smaller in size. C. The Debug log will display information about breakpoints you set in your Apex code. D. The amount of information included in a debug log can be controlled by the log category and level.

B. Each Debug log must be 5MB or smaller in size. D. The amount of information included in a debug log can be controlled by the log category and level.

What is a benefit of the Lightning Component framework? Choose 3 answers A. It uses client-side Apex controllers for logic. B. It uses a traditional publish-subscribe model. C. It uses an event-driven architecture D. It uses an MVC architectural design pattern. E. It uses server-side JavaScript controller for logic.

B. It uses a traditional publish-subscribe model. C. It uses an event-driven architecture D. It uses an MVC architectural design pattern.

Which statement should a developer avoid using inside procedural loops? (Choose 2) A. System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime() ); B. List contacts = [SELECT Id, Salutation, FirstName, LastName, Email FROM Contact WHERE AccountId = :a.Id]; C. If(o.accountId == a.id) D. Update contactList;

B. List contacts = [SELECT Id, Salutation, FirstName, LastName, Email FROM Contact WHERE AccountId = :a.Id]; D. Update contactList;

When loading data into an operation, what can a developer do to match records to update existing records? (Choose 2) A. Match an auto-generated Number field to a column in the imported file. B. Match an external Id Text field to a column in the imported file. C. Match the Name field to a column in the imported file. D. Match the Id field to a column in the imported file.

B. Match an external Id Text field to a column in the imported file. D. Match the Id field to a column in the imported file.

A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug(' NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged? A. List Exception B. NullPointer Exception C. Generic Exception D. No message is logged

B. NullPointer Exception

In an action method within a Visualforce custom controller class, you need to navigate to another Visualforce page called "SuccessPage." How would you instantiate the PageReference? A. PageReference pageRef = ApexPages.SuccessPage; B. PageReference pageRef = Page.SuccessPage; C. PageReference pageRef = new PageReference(′SuccessPage′); D. PageReference pageRef = SuccessPage.PageReference;

B. PageReference pageRef = Page.SuccessPage;

What is a valid source and destination pair that can send or receive change sets? (Choose 2) A. Developer Edition to Sandbox B. Sandbox to Production C. Sandbox to Sandbox D. Developer Edition to Production

B. Sandbox to Production C. Sandbox to Sandbox

What is a use case supported by the System.runAs(user u) method in Apex? (Choose two correct answers.) A. System.runAs(user U) enforces field-level security and user permissions when invoked in a custom controller. B. System.runAs(user U) enables a developer to write a test method that enforces the sharing settings for user U. C. When invoked in an Anonymous block, System.runAs(user U) enforces the sharing settings for user U. D. System.runAs(user U) allows the execution of mixed DML operations within a single test method.

B. System.runAs(user U) enables a developer to write a test method that enforces the sharing settings for user U. D. System.runAs(user U) allows the execution of mixed DML operations within a single test method.

A developer wants to create a custom object to track Customer Invoices.How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account? A. The Account should have a Master-Detail relationship to the Invoice. B. The Invoice should have a Master-Detail relationship to the Account C. The Account should have a Lookup relationship to the Invoice D. The Invoice should have a Lookup relationship to the Account Previous

B. The Invoice should have a Master-Detail relationship to the Account

A developer needs to create a utility class that has the accountCreation method which returns a single Account sObject. What is a true stament about a test utility class? (Choose two correct answers.) A. If the utility class is annotated with @isTest, the accountCreation method will not be able to be invoked from other Apex test methods. B. The accountCreation method in the utility class can be defined with parameters and can return a value. C. The accountCreation method should be declared as public or global. D. If the utility class is annotated with @isTest, an Apex test method and non-test Apex code can invoke the public accountCreation method, as long as they are in the same namespace.

B. The accountCreation method in the utility class can be defined with parameters and can return a value. C. The accountCreation method should be declared as public or global.

What is a good practice for a developer to follow when writing a trigger? (Choose 2) A. Using @future methods to perform DML operations. B. Using the Map data structure to hold query results by ID. C. Using the Set data structure to ensure distinct records. D. Using synchronous callouts to call external systems.

B. Using the Map data structure to hold query results by ID. C. Using the Set data structure to ensure distinct records.

A developer needs to write an Apex controller that will be invoked from a Visualforce page. The Visualforce page should allow a user to search for a string of text within the standard Name field for the following objects: Account, Contact, and Lead. What is the optimal solution in the Apex controller to perform a text search across these objects? A. For each sObject that needs to be searched, write a SOQL statement to search for the string of text. Then, combine the results of all of the SOQL statements into a single List<sObject> variable. B. Write a single SOSL statement to search for the string of text across Account, Contact, and Lead. C. Use dynamic SOQL to build a query at runtime that specifies which sObjects should be searched. D. For each object that needs to be searched, write a SOSL statement to search for the string of text. Then, combine the results of all of the SOSL statements into a single List<List<sObject>> variable.

B. Write a single SOSL statement to search for the string of text across Account, Contact, and Lead.

A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve the correct URL for the current user'sprofile and display this on a Visualforce Page? A. {!$Setup.Url_Settings__C.Instance[Profile.Id].URL__c} B. {!$Setup.Url_Settings__C.URL__c} C. {!$Setup.Url_Settings__C.[Profile.Id].URL__c} D. {!$Setup.Url_Settings__C.[$Profile.Id].URL__c}

B. {!$Setup.Url_Settings__C.URL__c}

The initial value for a number field on a record is 1. A user updated the value of the number field to 10. This action invokes a workflow field update, which changes the value of the number field to 11. After the workflow field update, an update trigger fires. What is the value of the number field of the object that is obtained from Trigger.old? A. Null B. 11 C. 1 D. 10

C. 1

A developer writes a SOQL query to find child records for a specific parent. How many levels can be returned in a single query? A. 1 B. 7 C. 5 D. 3

C. 5

Which annotation for a method in a test class indicates that it will be run once before any of the class's test methods are executed? A. @isTest (runOnce = TRUE) B. @isTest (seeAllData = TRUE) C. @testSetup D. @testMethod

C. @testSetup

A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class? A. Add the TestVisible attribute to the Apex class B. Add the SeeAllData attribute to the test methods. C. Add the TestVisible attribute to the apex methods. D. Add the SeeAllData attribute to the test class

C. Add the TestVisible attribute to the apex methods.

In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex? A. As a String with each value separated by a comma B. As a Set with each value as an element in the set C. As a String with each value separated by a semicolon D. As a List with each value as an element in the list Previous

C. As a String with each value separated by a semicolon

What is the value of x after the code segment executes?String x = 'A';Integer i = 10;if ( i < 15 ) {i = 15;x = 'B';} else if ( i < 20 ) {x = 'C';} else {x = 'D'; } A. D B. A C. B D. C

C. B

How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex? A. By querying the role hierarchy. B. By calling the isShared() method for the record. C. By querying CustomObject__Share. D. By calling the profile settings of the current user.

C. By querying CustomObject__Share.

A company wants a recruiting app that models candidates and interviews; displays the total number of interviews on each candidate record; and defines security on interview records that is independent from the security on candidate records. What would a developer do to accomplish this task? Choose 2 answers A. Create a roll -up summary field on the Candidate object that counts Interview records. B. Create a master -detail relationship between the Candidate and Interview objects. C. Create a lookup relationship between the Candidate and Interview objects. D. Create a trigger on the Interview object that updates a field on the Candidate object.

C. Create a lookup relationship between the Candidate and Interview objects. D. Create a trigger on the Interview object that updates a field on the Candidate object.

Which type of code represents the Controller in MVC architecture on the Force.com platform? (Choose 2) A. JavaScript that is used to make a menu item display itself. B. A static resource that contains CSS and images. C. Custom Apex and JavaScript coda that is used to manipulate data. D. StandardController system methods that are referenced by Visualforce.

C. Custom Apex and JavaScript coda that is used to manipulate data. D. StandardController system methods that are referenced by Visualforce.

A developer needs to provide a Visualforce page that lets users enter Product-specific details during a Sales cycle. How can this be accomplished? (Choose 2) A. Download a Managed Package from the AppExhange that provides a custom Visualforce page to modify. B. Copy the standard page and then make a new Visualforce page for Product data entry. C. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify. D. Create a new Visualforce page and an Apex controller to provide Product data entry.

C. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify. D. Create a new Visualforce page and an Apex controller to provide Product data entry.

A developer creates an Apex Trigger with the following code block: List<Account> customers = new List<Account>(); For (Order__c o: trigger.new) { Account a = [SELECT Id, Is_Customer__c FROM Account WHERE Id = :o.Customer__c]; a.Is_Customer__c = true; customers.add(a); } Database.update(customers, false); The developer tests the code using Apex Data Loader and successfully loads 10 Orders. Then, the developer loads 150 Orders. How many Orders are successfully loaded when the developer attempts to load the 150 Orders? A. 0 B. 1 C. 150 D. 100

A. 0

Which Apex collection is used to ensure that all values are unique? A. A Set B. An Enum C. A List D. An sObject

A. A Set

Which use case is supported by a partial DML statement in Apex? (Choose two correct answers.) A. A list of sObjects needs to be updated. You must perform additional logic only for the records that failed to be updated. B. A list of sObjects needs to be updated only if all records contained in the list are eligible to be succesfully updated. C. A list of sObjects including valid and invalid records needs to be inserted. You must ensure valid records are succesfully inserted. D. A list of sObject includes valid and non-valid records. It contains more than 10,000 records. You need to ensure records are inserted without hitting the DML governor limit.

A. A list of sObjects needs to be updated. You must perform additional logic only for the records that failed to be updated. C. A list of sObjects including valid and invalid records needs to be inserted. You must ensure valid records are succesfully inserted.

Which data type or collection of data types can SOQL statements populate or evaluate to? (Choose 3) A. A single sObject B. An integer C. A string D. A list of sObjects E. A Boolean

A. A single sObject B. An integer D. A list of sObjects

What is a true statement regarding try/catch blocks in Apex? (Choose two correct answers.) A. A try/catch statement can be defined with more than one catch statement in the catch block. B. A try/catch statement can be used to gracefully handle an exception caused by exceeding a governor limit. C. When implementing a try/catch statement, you can optionally define a finally block that will execute even if a statement in the catch block executes. D. If you implement a partial DML statement within the try block of a try/catch statement, any exceptions thrown by the partial DML statement will be caught in the generic catch block.

A. A try/catch statement can be defined with more than one catch statement in the catch block. C. When implementing a try/catch statement, you can optionally define a finally block that will execute even if a statement in the catch block executes.

A developer wrote a workflow email alert on case creation so that an email is sent to the case owner manager when a case is created. When will the email be sent? A. After Committing to database. B. Before Trigger execution. C. After Trigger execution. D. Before Committing to database.

A. After Committing to database.

What is the result of the following code block ? Integer x = 1; Integer Y = 0; While(x < 10) { Y++; } A. An error occurs B. Y = 9 C. Y = 10 D. X = 0

A. An error occurs

Which code block returns the ListView of an Account object using the following debug statement? system.debug(controller.getListViewOptions() ); A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1')); B. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]); C. ApexPages.StandardController controller = new ApexPages.StandardController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1')); D. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);

A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));

In which order does Salesforce execute events upon saving a record? A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit B. Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit C. Before Triggers; Validation Rules; After Triggers; Workflow Rules; Assignment Rules; Commit D. Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit

A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit

Which trigger event allows a developer to update fields in the Trigger.new list without using an additional DML statement?Choose 2 answers A. Before insert B. Before update C. After update D. After insert

A. Before insert B. Before update

A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines.What data model should be used to track the data and to prevent orphan records? A. Create a junction object to relate many engines to many parts through a master-detail relationship B. Create a lookup relationship to represent how each part relates to the parent engine object. C. Create a master-detail relationship to represent the one-to-many model of engines to parts. D. Create a junction object to relate many engines to many parts through a lookup relationship

A. Create a junction object to relate many engines to many parts through a master-detail relationship

A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting. Once an application is submitted for a job posting, that application cannot be modified to be resubmitted to a different job posting.What can the administrator do to associate an application with each job posting in the schema for the organization? A. Create a master-detail relationship in the Job Postings custom object to the Applications custom object. B. Create a master-detail relationship in the Application custom object to the Job Postings custom object. C. Create a lookup relationship on both objects to a junction object called Job Posting Applications. D. Create a lookup relationship in the Applications custom object to the Job Postings custom object

A. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.

What can a Lightning Component contain in its resource bundle? Choose 2 anser A. Custom client side rendering behavior. B. Build scripts for minification C. Properties files with global settings D. CSS styles scoped to the component

A. Custom client side rendering behavior. D. CSS styles scoped to the component

What is the minimum log level needed to see user-generated debug statements? A. DEBUG B. FINE C. INFO D. WARN

A. DEBUG

A developer needs to create records for the object Property__c. The developer creates the following code block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) { //exception handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created? A. Database.insert(propertiesToCreate, false); B. insert propertiesToCreate; C. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL); D. Database.insert(propertiesToCreate);

A. Database.insert(propertiesToCreate, false);

Which action can a developer perform in a before update trigger? (Choose 2) A. Display a custom error message in the application interface. B. Change field values using the Trigger.new context variable. C. Delete the original object using a delete DML operation. D. Update the original object using an update DML operation.

A. Display a custom error message in the application interface. B. Change field values using the Trigger.new context variable.

What is a capability of the Developer Console? A. Execute Anonymous Apex code, Create/Edit code, view Debug Logs. B. Execute Anonymous Apex code, Run REST API, create/Edit code. C. Execute Anonymous Apex code, Create/Edit code, Deploy code changes. D. Execute Anonymous Apex code, Run REST API, deploy code changes.

A. Execute Anonymous Apex code, Create/Edit code, view Debug Logs.

Which option would a developer use to display the Accounts created in the current week and the number of related Contacts using a debug statement in Apex? A. For(Account acc: [SELECT Id, Name,(SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = THIS_WEEK]) { List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'; } B. For(Account acc: [SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = CURRENT_WEEK]){ List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'); } C. For(Account acc:[SELECT Id, Name, Account.Contacts FROM Account WHERE CreatedDate = CURRENT_WEEK]) { List cons = acc.Account.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'); } D. For(Account acc: [SELECT Id, Name, Account.Contacts FROM Account WHERE CreatedDate = THIS_WEEK]){ List cons = acc.Account.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts' }

A. For(Account acc: [SELECT Id, Name,(SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = THIS_WEEK]) { List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'; }

What is a capability of formula fields? (Choose 3) A. Generate a link using the HYPERLINK function to a specific record in a legacy system. B. Display the previous values for a field using the PRIORVALUE function. C. Return and display a field value from another object using the VLOOKUP function. D. Determine if a datetime field has passed using the NOW function. E. Determine which of three different images to display using the IF function.

A. Generate a link using the HYPERLINK function to a specific record in a legacy system. D. Determine if a datetime field has passed using the NOW function. E. Determine which of three different images to display using the IF function.

A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString = 'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}What does the user see when accessing the custom page? A. GetMyString , , Method2 , getMystring B. , , Method2 , getMyString C. , , Method2, D. GetMyString , , ,

A. GetMyString , , Method2 , getMystring

What is an important consideration when developing in a multi-tenant environment? A. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance. B. Unique domain names take the place of namespaces for code developed for multiple orgs on multiple instances. C. Polyglot persistence provides support for a global, multilingual user base in multiple orgs on multiple instances. D. Org-wide data security determines whether other tenants can see data in multiple orgs on the same instance.

A. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance.

Which statement would a developer use when creating test data for products and pricebooks? A. Id pricebookId = Test.getStandardPricebookId(); B. Pricebook pb = new Pricebook(); C. IsTest(SeeAllData = false); D. List objList = Test.loadData(Account.sObjectType, 'myResource');

A. Id pricebookId = Test.getStandardPricebookId();

What is a capability of a StandardSetController?Choose 2 answers A. It allows pages to perform mass updates of records B. It allows pages to perform pagination with large record sets C. It enforces field-level security when reading large record sets D. It extends the functionality of a standard or custom controller

A. It allows pages to perform mass updates of records B. It allows pages to perform pagination with large record sets

Which type of information is provided by the Checkpoints tab in the Developer Console? (Choose 2) A. Namespace B. Time C. Exception D. Debug Statement

A. Namespace B. Time

A developer wants to list all of the Tasks for each Account on the Account detail page. When a task is created for a Contact, what does the developer need to do to display the Task on the related Account record? A. Nothing. The task is automatically displayed on the Account page. B. Nothing. The Task cannot be related to an Account and a Contact. C. Create a Workflow rule to relate the Task to the Contact's Account. D. Create an Account formula field that displays the Task information.

A. Nothing. The task is automatically displayed on the Account page.

How can a developer retrieve all Opportunity record type labels to populate a list collection? Choose 2 answers A. Obtain describe object results for the Opportunity object. B. Write a for loop that extracts values from the Opportunity.RecordType.Name field. C. Use the global variable $RecordType and extract a list from the map. D. Write a SOQL for loop that iterates on the RecordType object.

A. Obtain describe object results for the Opportunity object. D. Write a SOQL for loop that iterates on the RecordType object.

Where can the custom roll-up summary fields be created using Standard Object relationships (Choose 3) A. On Opportunity using Opportunity Product records. B. On Account using Case records. C. On Quote using Order records. D. On Campaign using Campaign Member records. E. On Account using Opportunity records.

A. On Opportunity using Opportunity Product records. D. On Campaign using Campaign Member records. E. On Account using Opportunity records.

What is an accurate statement about variable scope? (Choose 3) A. Parallel blocks can use the same variable name. B. A variable can be defined at any point in a block. C. Sub-blocks cannot reuse a parent block's variable name. D. Sub-blocks can reuse a parent block's variable name if it's value is null. E. A static variable can restrict the scope to the current block of its value is null.

A. Parallel blocks can use the same variable name. B. A variable can be defined at any point in a block. C. Sub-blocks cannot reuse a parent block's variable name.

What is an implication of referencing a field in Apex? (Choose two correct answers.) A. The field cannot be deleted in the UI from the Setup menu. B. The field cannot be hidden on a page layout. C. The field cannot be set as universally required. D. The field's data type cannot be changed.

A. The field cannot be deleted in the UI from the Setup menu. D. The field's data type cannot be changed.

Which is a true statement regarding deployment from a sandbox environment to a production environment? (Choose two correct answers.) A. The overall code coverage in the production environment should be at least 75%. B. Each trigger and class must have at least 75% code coverage. C. A custom validation rule is not enforced when deploying metadata from a sandbox to a production environment. D. Each trigger must have at least one line of code coverage.

A. The overall code coverage in the production environment should be at least 75%. D. Each trigger must have at least one line of code coverage.

Which statement about change set deployments is accurate? (Choose 3) A. They use an all or none deployment model. B. They require a deployment connection. C. They ca be used to transfer Contact records. D. They can be used to deploy custom settings data. E. They can be used only between related organisations.

A. They use an all or none deployment model. B. They require a deployment connection. E. They can be used only between related organisations.

public List<Certification_Attempt__c> certAttempts { public get { return [SELECT Id, Name FROM Certification_Attempt__c LIMIT 10]; } private set; } Given the code above, which of the following is true? A. This property is read-only. B. This property executes DML. C. This property is read-write. D. This property can return multiple records.

A. This property is read-only. D. This property can return multiple records.

When can a developer use a custom Visualforce page in a Force.com application? (Choose 2) A. To generate a PDF document with application data B. To create components for dashboards and layouts C. To deploy components between two organizations D. To modify the page layout settings for a custom object

A. To generate a PDF document with application data B. To create components for dashboards and layouts

A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? (Choose 2) A. Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues(). B. Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos(). C. Use SOQL to query Case records in the org to get all the RecordType values available for Case. D. Use SOQL to query case records in the org to get all values for the Status picklist field.

A. Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues(). B. Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos().

A developer needs to confirm that an Account trigger is working correctly without changing the organization's data. What would the developer do to test the Account trigger? A. Use the Test menu on the developer Console to run all test classes for the account trigger. B. Use the New button on the Salesforce Accounts Tab to create a new Account record. C. Use the Open Execute Anonymous feature on the Developer Console to run an 'insert Account' DML statement. D. Use Deply from the Force.com IDE to deploy an 'insert Account' Apex class.

A. Use the Test menu on the developer Console to run all test classes for the account trigger.

What is a valid way of loading external JavaScript files into a Visualforce page? (Choose 2) A. Using an (apex:includeScript)* tag. \> B. Using an (apex:define)* tag. C. Using a (link)* tag. D. Using a (script)* tag.

A. Using an (apex:includeScript)* tag. \> D. Using a (script)* tag.

Which declarative method helps ensure quality data? (Choose 3) A. Validation Rules B. Workflow alerts C. Exception Handling D. Lookup Filters E. Page Layouts

A. Validation Rules D. Lookup Filters E. Page Layouts

What is an accurate constructor for a custom controller named "MyController"? A. public MyController () { account = new Account () ; } B. public MyController (sObject obj) { account = (Account) obj; } C. public MyController (List objects) { accounts = (List ) objects; } D. public MyController (ApexPages.StandardController stdController) { account = (Account) stdController.getRecord(); }

A. public MyController () { account = new Account () ; }

The variable contactsToUpdate is a List<Contact> that contains 200 valid and invalid Contacts. Consider the following DML statement: Database.SaveResult[] resultList = Database.insert(contactsToUpdate,false); What is a true statement regarding the variable "resultList"? (Choose two correct answers.) A. resultList will contain a saveResult for each Contact in contactsToUpdate, regardless of whether the Contact was successfully inserted. B. resultList will contain a saveResult for each Contact in contactsToUpdate that was successfully inserted. C. The order of the saveResults in resultList will match the order of the Contacts in contactsToUpdate. D. The order of the saveResults in resultList will not match the order of the Contacts in contactsToUpdate.

A. resultList will contain a saveResult for each Contact in contactsToUpdate, regardless of whether the Contact was successfully inserted. C. The order of the saveResults in resultList will match the order of the Contacts in contactsToUpdate.

A developer executes the following code in the Developer Console: List<Account> fList = new List <Account> (); For(integer i= 1; I <= 200; i++) { fList.add(new Account ( Name = 'Universal Account ' + i)); } Insert fList; List <Account> sList = new List<Account>(); For (integer I = 201; I <= 20000; i ++) { sList.add(new Account (Name = 'Universal Account ' + i)); } Insert sList; How many accounts are created in the Salesforce organization ? A. 20000 B. 0 C. 200 D. 1000

B. 0

A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:Account myAccount = new Account(Name = 'MyAccount');Insert myAccount;For (Integer x = 0; x < 150; x++) {Account newAccount = new Account (Name='MyAccount' + x);try {Insert newAccount;} catch (Exception ex) {System.debug (ex) ;}}insert new Account (Name='myAccount');How many accounts are in the org after this code is run? A. 101 B. 100 C. 102 D. 252

B. 100

Which user can edit a record after it has been locked for approval? (Choose 2) A. Any user with a higher role in the hierarchy B. A user who is assigned as the current approver C. Any user who approved the record previously D. An administrator

B. A user who is assigned as the current approver D. An administrator

What is a true statement regarding interfaces in Apex? (Choose two correct answers.) A. An interface can only be defined as global. B. An Apex class that implements an interface must provide a definition for all methods declared in the interface. C. An Apex class can implement more than one interface at a time. D. A method defined in an interface can have an access modifier.

B. An Apex class that implements an interface must provide a definition for all methods declared in the interface. C. An Apex class can implement more than one interface at a time.

A developer has the following query: Contact c = [SELECT id, firstname, lastname, email FROM Contact WHERE lastname = 'Smith']; What does the query return if there is no Contact with the last name 'Smith'? A. A contact initialized to null. B. An error that no rows are found. C. An empty List of Contacts. D. A Contact with empty values.

B. An error that no rows are found.

A developer needs to perform repetitive deployments of configuration changes among environments, including sandbox and production. What tool can be used to automate this process? A. Change Sets B. Force.com IDE C. Force.com Migration Tool D. Managed Package

C. Force.com Migration Tool

A company would like to send an offer letter to a candidate, have the candidate sign it electronically, and then send the letter back. What can a developer do to accomplish this? A. Create a visual workflow that will capture the candidate's signature electronically B. Develop a Process Builder that will send the offer letter and allow the candidate to sign it electronically. C. Install a managed package that will allow the candidate to sign documents electronically D. Create an assignment rule that will assign the offer letter to the candidate

C. Install a managed package that will allow the candidate to sign documents electronically

Which resource can be included in a Lightning Component bundle? Choose 2 answers A. Apex class B. Adobe Flash C. JavaScript D. Documentation

C. JavaScript D. Documentation

Which scenario is invalid for execution by unit tests? A. Executing methods for negative test scenarios B. Loading the standard Pricebook ID using a system method C. Loading test data in place of user input for Flows. D. Executing methods as different users.

C. Loading test data in place of user input for Flows.

Which access modifier denotes a class that is only accessible within your namespace? A. Global B. Protected C. Public D. Private

C. Public

A developer needs to know if all tests currently pass in a Salesforce environment. Which feature can the developer use? (Choose 2) A. ANT Migration Tool B. Workbench Metadata Retrieval C. Salesforce UI Apex Test Execution D. Developer Console

C. Salesforce UI Apex Test Execution D. Developer Console

Consider the following Anonymous block: Account newAccount = new Account(Name='ABC Corp'); insert newAccount; Contact newContact = new Contact(LastName = 'Smith', accountId = newAccount.Id); insert newContact; When this code executes, what is a true statement about the save order of execution? (Choose two correct answers.) A. All custom validations defined on the Account object and the Contact object will be executed immediately after the insertion of newAccount. B. The newly inserted Contact will not be associated to the referenced Account because the Id of the Account record is not available until the end of the transaction. C. The Account record and the Contact record will be committed to the database at the end of the transaction, followed by the execution of any post-commit logic defined. D. In the event of an uncaught exception while inserting the Account record, both insertions will be rolled back.

C. The Account record and the Contact record will be committed to the database at the end of the transaction, followed by the execution of any post-commit logic defined. D. In the event of an uncaught exception while inserting the Account record, both insertions will be rolled back.

The decimal variable DISCOUNT has been defined in an Apex class, as follows: static final Decimal DISCOUNT = 0.5; What is a true statement regarding the variable "DISCOUNT"? (Choose two correct answers.) A. The final keyword allows this variable to be accessible by other classes. B. The value of this variable is assignable in non-static methods of the class. C. The value assigned to this variable will be accessible by other static methods defined in the class. D. This variable has been defined as an Apex constant, and its value cannot be changed.

C. The value assigned to this variable will be accessible by other static methods defined in the class. D. This variable has been defined as an Apex constant, and its value cannot be changed.

What is the correct syntax for referencing the Status__c field of the Certification__c custom object on a Visualforce page? A. {$Certification__c.Status__c} B. [!Certification__c.Status__c] C. {!Certification__c.Status__c} D. [$Certification__c.Status__c]

C. {!Certification__c.Status__c}

A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization? A. Apex Triggers B. HTTP Callouts C. Apex Controllers D. Anonymous Blocks

D. Anonymous Blocks

A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits? A. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of DML statements is exceeded. B. By using Messaging.sendEmail() to continue toe transaction and send an alert to the user after the number of DML statements is exceeded. C. By using AmexMessage.Messages() to display an error message after the number of DML statements is exceeded. D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements is exceeded.

D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements is exceeded.

A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object. How can a developer display data from the parent record on the page? A. By adding a second standard controller to the page for the parent record. B. By using a roll-up formula field on the child record to include data from the parent record. C. By using SOQL on the Visualforce page to query for data from the parent record. D. By using merge field syntax to retrieve data from the parent record.

D. By using merge field syntax to retrieve data from the parent record.

The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. What would a developer do to meet this requirement? A. Create a trigger on the Account object that queries the Close Date of the most recent Opportunities. B. Create a Workflow rule on the Opportunity object that updates a field on the parent Account. C. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field. D. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field.

D. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field.

A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. Which action can a developer take to enforce this requirement? A. Create a required Visualforce component. B. Create a formula field. C. Create a required comments field. D. Create a validation rule.

D. Create a validation rule.

What is the proper process for an Apex Unit Test A. Query for test data using SeeAllData = true. Call the method being tested. Verify that the results are correct. B. Query for test data using SeeAllData = true. Execute runAllTests(). Verify that the results are correct. C. Create data for testing. Execute runAllTests(). Verify that the results are correct. D. Create data for testing. Call the method being tested. Verify that the results are correct.

D. Create data for testing. Call the method being tested. Verify that the results are correct.

Where would a developer build a managed package? A. Developer Sandbox B. Unlimited Edition C. Partial Copy Sandbox D. Developer Edition

D. Developer Edition

A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic? A. In a Standard Extension. B. In a Standard Controller. C. In a Custom Controller. D. In a Controller Extension.

D. In a Controller Extension.

What is a benefit of the lightning component framework? A. Better integration with Force.com sites B. Better performance for custom Salesforce1 Mobile Apps C. More Centralized control via server-side logic D. More pre-built components to replicate the salesforce look and feel

D. More pre-built components to replicate the salesforce look and feel


संबंधित स्टडी सेट्स

Selective and Differential Media

View Set

Olds Maternal-Newborn nursing ch 26, Olds Maternal-Newborn nursing ch 27, Olds Maternal-Newborn nursing ch 28, Olds Maternal-Newborn nursing ch 29, Olds Maternal-Newborn nursing ch 30, Olds Maternal-Newborn Nursing ch 31, Olds Maternal-Newborn Nursin...

View Set

Multiply and Divide Complex Numbers 100%

View Set

ATI (Pharm) Respiratory {Term 3} Extra

View Set

MCB Exam 2 Sapling/Discussion Questions

View Set

Chapter 4: State of Consciousness

View Set