Test
Salesforce Dev 1 Exam Practice
Preguntas del test (148)
1Why would a developer use Test.startTest() and Test.stopTest()?
- ATo avoid apex code coverage requirements for the code between the lines.
- BTo start and stop anonymous block execution when executing anonymous apex code.
- CTo indicate test code so that it does not impact Apex line count governor limits.
- DTo create an additional set of governor limits during the set of a single test class.
2What must a controller for a VF page utilize to override the standard opportunity view button?
- AThe StandardSetController to support related lists for pagination.
- BThe Opportunity StandardController for pre-built functionality.
- CA callback constructor to reference the StandardController.
- DA constructor that initializes a private Opportunity variable.
3A developer Uses a before insert trigger on Lead object to fetch the Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10000 Lead records. The developer has the following code block:
for(Lead l : Trigger.new){
If(l.PostalCode != null){
List<Territory__c> terrList = [Select Id from Territory__c where PostalCode__c =: l.PostalCode ];
If(terrList.size() > 0){
l.Territory__c = terrList[0].Id;
}
}
}
Which line of code is causing the code block to fail?- A03: A SOQL query is located inside of the for loop code.
- B01: Trigger.new is not valid in a before insert Trigger.
- C02: A NullPointer exception is thrown if postalCode is null.
- D05: The Lead in a before insert trigger cannot be updated.
4What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?
- ACreate a process with Process Builder.
- BCreate a workflow rule with a field update.
- CCreate a Lightning Component.
- DCreate a VF page.
5Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers.
- ACreate activities at multiple intervals.
- BSend an outbound message without Apex Code.
- CCopy an account address to its contacts.
- DSubmit a contact for approval.
6In the code below, what type does Boolean Inherit from?
Boolean b = true;- AEnum
- BObject
- CString
- DClass
7An org has different Apex Classes that provide Account-related functionality. After a new validation rule is added to the Account object, many of the test methods fail.
What can be done to resolve the failures and reduce the number of code changes needed for future validation rules? Choose 2 answers.- ACreate a method that creates valid Account records, and call this method from within test methods.
- BCreate a method that loads valid Account records from a Static resource, and call this method within test methods.
- CCreate a method tha performs a callout for a valid Accounyt record, and call this method from within test methods.
- DCreate a method that queries for a valid Account records, and call this method from within test methods.
8Which component is available to deploy using Metadata API?
Choose 2 answers- ACase Layout
- BAccount Layout
- CCase Feed Layout
- DConsole Layout
9What is the preferred way to reference web content—such as images, stylessheet, Javascript, and other libraries – that is used in VF pages?
- ABy accessing the content from Chatter Files.
- BBy uploading the content in the Documents tab.
- CBy accessing the content from a thirty – party CDN.
- DBy uploading the content as a Static Resource.
10A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce.
Which kind of relationship would a developer use to relate the account to the Warehouse?- AOne to Many
- BLookup
- CMaster – Detail
- DParent Child
11A Developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for the object.
What happens when a user updates a record?- ANo changes are made to the data.
- BBoth the Apex Trigger and Workflow Rule are fired only once.
- CThe Workflow rule is fired more than once.
- DThe Apex Trigger is fired more than once.
12What is true of a partial sandbox that is not true of a full sandbox?
Choose 2 answers- AMore frequent refreshes.
- BOnly include necessary metadata.
- CUse of change sets.
- DLimited to 5GB of data.
13In which order does Salesforce execute events upon saving a record.
- ABefore Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit
- BValidation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit
- CBefore Triggers; Validation Rules; After Triggers; Workflow Rules; Assignment Rules; Commit
- DValidation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit
14When loading data into an organization, what can a developer do to match records to update existing records?
Choose 2 answers- AMatch an external Id Text field to a column in the imported file.
- BMatch the Id field to a column in the imported file.
- CMatch the Name field to a column in the imported file.
- DMatch an auto-generated Number field to a column in the imported file.
15In an organization that has enabled multiple currencies, a developer needs to aggregate the sum of the Estimate_Value__c currency field from the CampaignMember object using a roll-up summary field called Total_Estimated_Value__c on Campaign.
How is the currency of the Total_Estimated_Value__c roll-up summary field determined?- AThe values in CampaignMember.Estimated_Value__c are converted into the currency into the currency of the Campaign record, and the sum is display using the currency on the Campaign record.
- BThe values in CampaignMember.Estimated_Value__c are converted into the currency on the majority of the CampaignMember records and the sum is displayed using that currency.
- CThe values in CampaignMember.Estimated_Value__c are summed up and the resulting Total_Estimated_Value__c field is displayed as a numeric field on the Campaign record.
- DThe values in CampaignMember.Estimated_Value__c are converted into the currency of the current user, and the sum is displayed using the currency on the Campaign record.
16A 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 administer do to associate an application with each job posting in the scema for the organization?- ACreate a lookup relationship on both objects to a junction object Job Posting Applications.
- BCreate a master- detail relationship in the Job postings custom object to the Applications custom object.
- CCreate a master- detail relationship in the Application custom object to the job Postings custom object.
- DCreate a lookup relationship in the Applications custom object to the Job Postings custom object.
17What is a characteristic of the Lightning Component Framework?
Choose 2 answers.- AIt has an event–driven Architecture.
- BIt works with the existing VF pages.
- CIt includes responsive components.
- DIt uses XML as its data format.
18What is a capability of cross – object formula fields?
Choose 3 answers.- AFormula fields can reference fields from master –detail or lookup parent relationships.
- BFormula fields can expose data the user does not have access to in a record.
- CFormula fields can be used in three roll-up summaries per object.
- DFormula fields can reference fields in a collection of records from a child relationship.
- EFormula fields can reference fields from objects that are up to 10 relationships away.
19A 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?- AApex Triggers
- BHTTP Callouts
- CApex Controllers
- DAnonymous Blocks
20A developer created an Apex trigger using the Developer Console and now wants to debug code.
How can the developer accomplish this in the Developer Console?- ASelect the override Log Triggers checkbox for the trigger.
- BAdd the user name in the Log Inspector.
- COpen the Progress tab in the Developer Console.
- DOpen the Logs tab in the Developer Console.
21Which data structure is returned to a developer when performing a SOSL search?
- AA list of lists of sObjects.
- BA map of sObject types to a list of sObjects.
- CA map of sObject type to a list of lists of sObjects.
- DA list of sObjects.
22How can a developer avoid exceeding governor limits when using an apex Trigger?
Choose 2 answers- ABy using a helper class that can be invoked from multiple triggers.
- BBy using the database class to handle DML transactions.
- CBy usings Maps to hold data from query results.
- DBy performing DML transactions on lists of sObjects.
23What is a correct pattern to follow when programming in Apex on a multi-tenant platform?
- AApex code is created in a separate environment from schema to reduce deployment errors.
- BDML is performed on one record at a time to avoid possible data concurrency issues.
- CQueries select the fewest fields and the records possible to avoid exceeding governor limits.
- DApex classes use the “with sharing” keyword to prevent access from other server tenants.
24What should a developer working in a sandbox use to exercise a new test class before the developer deploys that test class to production?
Choose 2 answers.- AThe REST API and apexTestRun method.
- BThe Apex Test Execution page in Salesforce Setup
- CThe Test menu in the Developer Console.
- DThe Run Tests page in Salesforce setup.
25A company that uses a custom object to track candidates would like to send candidate information automatically to a third-party human resources system when a candidate is hired.
What can a developer do to accomplish this task?- ACreate an escalation rule to the hiring manager.
- BCreate an auto response rule to the candidate.
- CCreate a Process Builder with an outbound message action.
- DCreate a workflow rule an outbound message action.
26What is an accurate statement about with sharing keyword?
Choose 2 answers- AInner classes do not inherit the sharing setting from the container class.
- BBoth inner and outer classes can be declared as with sharing.
- CEither inner or outer classes can be declared as with sharing, but not both.
- DInner classes inherit the sharing setting from the container class.
27How can a developer refer to, or instantiate, a PageReference in Apex?
Choose 2 answers.- ABy using a PageReference with a partial or full URL.
- BBy using the Page object and a VF page name.
- CBy using the ApexPages.Page() method with a VF name.
- DBy using the PageReference.Page() method with a partial or full URL.
28Which standard field must be populated when a developer inserts new Contact records programmatically?
- AAccountId.
- BName
- CLastName
- DFirstName.
29What is the minimum log level needed to see user-generated debug statements?
- ADEBUG
- BFINE
- CINFO
- DWARN
30A developer creates a new VF page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension. Change set deployment to production fails with the test coverage warning: “Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required.”
What can the developer do to successfully deploy the new VF page and extension?- ACreate test classes to exercise the VF page markup.
- BSelect “Disable Parallel APEX testing” to run all the tests.
- CAdd test methods to existing test classes from previous deployments.
- DSelect “Fast Deployment” to bypass running all the tests.
31A developer needs to automatically populate the ReportsTo field in a Contact record based on the values of the related Account and Department fields in the Contact record.
Which type of trigger would the developer create?
Choose 2 answers.- ABefore update
- BAfter Insert
- CBefore Insert
- DAfter update.
32A 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?- ACreate a junction object to relate many engines to many parts through a master-detail relationship.
- BCreate a master-detail relationship to represent the one-to-many model of engines to parts.
- CCreate a lookup relationship to represent how each part relates to the parent engine object.
- DCreate a function object to relate many engines to many parts through a lookup relationship.
33To which primitive data type in Apex is a currency field automatically assigned?
- AInteger
- BDecimal
- CDouble
- DCurrency
34Which resource can be included in a Lightning Component bundle?
Choose 2 answers- AApex class
- BAdobe flash
- CJavascript
- DDocumentation
35A custom exception named “RecordNotFoundException” is defined by the following code block:
Public class RecordNotFoundException extend Exception ()
Which statement can a developer use to throw the custom exception?
Choose 2 answers- AThrow new RecordNotFoundException(‘Problem Occured’);
- BThrow new RecordNotFoundException();
- CThrow RecordNotFoundException(‘Problem Occured’);
- DThrow RecordNotFoundException();
36When creating unit tests in Apex, which statement is accurate?
- AUnit tests with multiple methods result in all methods falling every time one method fails.
- BIncreased test coverage requires large test classes with many lines of code in one method.
- CTriggers do not require any unit tests in order to deploy them from sandbox to production.
- DSystem Assert statements that do not increase code coverage contribute important feedback in unit tests.
37{
Public String getStringMethod1(){
Return myString;
}
Public String getStringMethod2(){
If (myString == null)
myString = ‘Method2’;
return myString;
}
}
<apex:page controller=”myController”>
{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}
</apex:page>
What does the user see when accessing the custom page?- AgetMyString, , ,
- B, , Method2,
- C, , Method2, getMyString
- DgetMyString, , Method2, getMyString
38What is a valid Apex statement ?
- AMap conMap = [Select Name from Contact];
- BAccount[] acctList = new List<Account>{new Account()};
- CInteger w, x, y = 123, z = ‘abc’;
- DPrivate static constant Double rate = 7.75;
39A developer has a single custom controller class that works with a VF Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple VF pages and from a parameter on the initial URL. Which statement is necessary inside the unit test for the custom controller?
- APublic ExtendController(ApexPages.StandardController cntrl){}
- BApexPages.currentPage().getParameters().put(‘Input’, ‘TestValue’);
- CTest.setCurrentPage(pageRef);
- DString nextPage = controller.save().getUrl();
40A 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 VF page.
Which action can the developer perform to get the record types and picklist values in the controller?
Choose 2 answers- AUse Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues().
- BUse Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos().
- CUse SOQL to query Case records in the org to get all the recordType values available for Case.
- DUse SOQL to query Case records in the org to get all values for the Status picklist field.
41An sObject named Application__c has a lookup relationship to another sObject named Position__c. Both Application__c and Position__c have a picklist field named Status__c.
When the Status__c field on Postion__c is updated, the Status__c field on Application__c needs to be populated automatically with the same value, and execute a workflow rule on Application__c.
How can a developer accomplish this?- ABy changing Application__c.Status__c into a roll-up summary field.
- BBy changing Application__c.Status__c into a formula field.
- CBy using an Apex trigger with a DML operation.
- DBy configuring a cross-object field update with a workflow.
42A 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?- ABefore Trigger execution.
- BAfter Committing to database.
- CBefore Committing to database.
- DAfter Trigger execution.
43Which type of code represents the controller in MVC architecture on the Force.com platform?
Choose 2 answers- AJavaScript that is used to make a menu item display itself.
- BStandardController system methods that are referenced by VF.
- CCustom Apex and Javascript code that is used to manipulate data.
- DA static resource that contains CSS and images.
44A developer needs to provide a VF page that lets users enter Product-specific details during a Sales cycle.
How can this be accomplished?
Choose 2 answers.- ADownload a managed Package from the AppExchange that provides a custom VF page to modify.
- BCreate a new VF page and an Apex controller to provide Product data entry.
- CCopy the standard page and then make a new VF page for Product data entry.
- DDownload an Unmanaged Package from the AppExchange that provides a custom vf PAGE TO MODIFY.
45A developer writes before insert trigger.
How can the developer access the incoming records in the trigger body?- ABy accessing the Trigger.new context variable.
- BBy accessing the Trigger.newRecords context variable.
- CBy accessing the Trigger.newMap context variable.
- DBy accessing th Tripper.newList context variable.
46A developer in a salesforce org with 100 Accounts executes 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?- A101
- B100
- C102
- D252
47The Review__c object has a lookup relationship upto the Job_Application__c object. The Job_Application__c object has a master-detail relationship up to the Position__c object.The relationship field names are based on the auto-populated defaults.
What is the recommended way to display field data from the related Review__c records on a VF page for a single Position record?- AUtilize the standard Controller for Position__c and cross-object Formula fields on the Job_Application__c object to display Review__c data.
- BUtilize the standard Controller for Position__c and a Controller Extension to query for Review__c data.
- CUtilize the standard Controller for Position__c and cross-object Formula fields on the Review__c object to display Review__c data.
48What is a capability of the Force.com IDE?
Choose 2 answers- ARoll back deployments.
- BRun Apex tests.
- CDownload debug logs.
- DEdit metadata components.
49Which code segment can be used to control when the dowork() method is called?
- Afor(triggerIsRunning t : trigger.new){
dowork();
} - BIf(trigger.IsRunning){
dowork();
} - Cfor (trigger.IsInsert t : trigger.new) {
dowork();
} - DIf (trigger.IsInsert){
dowork();
}
- Afor(triggerIsRunning t : trigger.new){
50When would a developer use a custom controller instead of a controller extension?
Choose 2 answers- AWhen a VF page needs to replace the functionality of a standard controller.
- BWhen a VF page does not reference a single primary object.
- CWhen a VF page should not enforce permissions or field–level security.
- DWhen a VF page needs to add new actions to a standard controller.
51What is a valid statement about Apex classes and interfaces?
Choose 2 answers- AThe default modifier for a class is private.
- BException classes must end with the word exception.
- CA class can have multiple levels of inner classes.
- DThe default modifier for an interface is private.
52A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created.
List<Case> childCases = new List<Case>();
for( Case parent : Trigger.new){
Case child = new Case(ParentId = parent.Id, Subject = parent.Subject);
childCases.add(child);
}
Insert childCase;
What happens after the code block executes?- AMultiple child cases are created for each parent case in Trigger.new.
- BA child case is created for each parent case in Trigger.new.
- CThe trigger enters an infinite loop and eventually fails.
- DThe trigger fails if the subject field on the parent is blank.
53A Developer wants to create a custom object to track Custom Invoices.
How should INVOICES AND Accounts be related to ensure that all Invoices are visible to everyone with the access to an account?- AThe account should have a Lookup relationship to the Invoice.
- BThe Invoice should have a Master-Detail relationship to the Account.
- CThe Account should have a Master-Detail relationship to the Invoice.
- DThe Invoice should have a Lookup relationship to the Account.
54What is a valid source and destination pair that can send or receive change sets?
Choose 2 answers- ASandbox to production.
- BDeveloper edition to sandbox.
- CDeveloper edition to production.
- DSandbox to sandbox.
55A developer needs to create records for the object Property__c. The developer creates the following code block:
List<Property__c> propertiesToCreate = helperClass.createPrperties();
try {
03.
} catch (Exception exp) {
// Exception handling
}
Which line of code would the developer insert at line 03 to ensure that at least some records are created, even if a few records have errors and fail to be created?- ADatabase.insert(propertiesToCreate, System.ALLOW_PARTIAL);
- BInsert propertiesToCreate;
- CDatabase.insert(propertiesToCreate, false);
- DDatabase.insert(propertiesToCreate);
56When the number of records in a recordset is unknown, which control statement should a developer use to implement set of code that executes for every record in the recordset, without performing a .size() or .length() method call?
- AFor(init_stmt; exit_condition;increment_stmt) { ... }
- BDo { ... } While (Condition)
- CFor (variable : list_or_set) { ... }
- DWhile (Condition) { ... }
57What is the result when a VF page calls an Apex controller, which calls another Apex Controller, which calls another apex class, which then results in hitting a governor limit?
- AAny changes up to the error are saved.
- BAny changes up the error are rolled back.
- CAll changes before a savepoint are saved.
- DAll changes are saved in the first Apex class.
58A developer has the following code block:
Public class PaymentTax {
Public static decimal SalesTax = 0.0875;
}
Trigger OpportunityLineItemTrigger on OpportunityLineItem (before insert, before update) {
PaymentTax PayTax = new PaymentTax();
Decimal ProductTax = ProductCost * XXXXXXXXXXXX;
}
To calculate the ProductTax, which code segment would a developer insert at the XXXXXXXXXXX to make the value of the class variable SalesTax accessible within the trigger?- ASalesTax
- BPayTax.SalesTax
- CPaymentTax.SalesTax
- DOpportunityLineItemTrigger.SalesTax.
59On a VF page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?
- AUse the constructor method for the controller.
- BUse the $Action.View method in VF page.
- CCreate a new PageReference object with the Id.
- DUse the <apex:detail> tag in VF page.
60A 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?- AAfter Commiting to database.
- BBefore Commiting to database.
- CBefore Trigger execution
- DAfter Trigger Execution.
61On a visualforce page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?
- AUse the Constructor method for the controller.
- BUse the $Action.view method in the visualforce page.
- CCreate a new Page reference object with the id.
- DUse the <apex:detail > tag in the visualforce page.
62A 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?- AAfter committing to database.
- BBefore committing to database.
- CBefore Trigger execution.
- DAfter Trigger execution.
63A 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?- ABy Using ApexMessage.message() to display an error message after the number of DML statements Is exceed.
- BBy using messaging.SendEmail() to continue the transaction and send an alert to the user after the number of DML statements is exceeded.
- CBy using PageReference.setRedirect() to redirect the user to an custom visualforce page before the number of BML statements is exceeded.
- DBy using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.
64What is the proper process for an Apex Unit Test?
- AQuery for test data using SeeAllData=true. Call the method being tested. verify that the results are corrected.
- BCreate data for testing. Execute runAllTests(). Verify that the results are corrdect.
- CCreate data for testing. Call the method being tested. Verify that the results are correct.
- DQuery for test data using SeeAllData=true. Execute runAllTests(). Verify that results are correct.
65A 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 answers- ACreate a new visualforce page and an apex controller to provide product data entry.
- BDownload an unmanaged package from the AppExchange that provides a custom visualforce page to modify.
- CCopy the standard page and then make a new visualforce page for product data entry.
- DDownload a Managed package from the AppExchange that provides accustom visualforce page to modify.
66Which declarative method helps ensure quality data?
Choose 3 answers.- AException handling.
- Bworkflow alerts.
- CValidation rules
- DLookup filters
- EPage layouts
67What is an accurate constructor for custom controller named “MYController”?
- Apublic MyController(){
account = new Account();
} - Bpublic MyController(Sobject obj){
account = (Account) obj;
} - Cpublic MyController(List<SObject> objects){
accounts = (List<Account>) objects;
} - Dpublic MyController(ApexPages.StandardController stdController){
account = (Account) stdController.getRecord();
}
- Apublic MyController(){
68A company wants a recruiting app that models candidates and interviews; display the total number of interviews 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.- ACreate a roll-up summary field on the candidate object that counts interview records.
- BCreate a master-detail relationship between the candidate and Interview objects.
- CCreate a lookup relationship between the candidate and interview objects.
- DCreate a trigger on the interview object that updates a fields on the candidate object.
69What is good practice for developer to follow when writing a trigger?
Choose 2 answers.- AUsing the Map data Structure to hold query results by ID.
- BUsing @future methods to perform DML operations.
- CUsing the Set data structure to ensure distinct records.
- DUsing synchronous callouts to call external systems.
70Which code block returns the ListView of an Account object using the following debug statement?
- AApexPages.StandardSetController controller = new
ApexPages.StandardSetController([SELECT id FROM Account LIMIT 1]); - BApexPages.StandardController controller = new
ApexPages.StandardController(Database.getQueryLocator(‘SELECT id FROM Account LIMIT 1’)); - CApexPages.StandardController controller = new
ApexPages.StandardController([SELECT id FROM Account LIMIT 1]); - DApexPages.StandardSetController controller = new
ApexPages.StandardSetController(Database.getQueryLocator(‘SELECT id FROM Account LIMIT 1’));
- AApexPages.StandardSetController controller = new
71Which data type or SOQL statements collection of data types can populate or evaluate to?
Choose 3 answers.- AA Boolean
- BAn integer
- CA list of sObjects
- DA single sObject
- EA String
72Which action can a developer perform in a before update trigger?
Choose 2 answers- AUpdate the original object using an update DML operation.
- BDelete the original object using a delete DML operation.
- CChange field values using the Trigger.new context variable.
- DDisplay a custom error message in the application interface.
73Where can debug log filter settings be set?
Choose 2 answers- AThe filters link by the monitored user’s name within the web UI
- BThe Show More link on the debug log’s record
- COn the monitored user’s Name.
- DThe Log Filters tab on a class or trigger detail page.
74What 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’;
}- AB
- BC
- CD
- DA
75When can a developer use a custom VF page in Force.com application?
Choose 2 answers- ATo create components for dashboards and layouts
- BTo deploy components between two organizations.
- CTo generate a PDF document with application data.
- DTo modify the page Layout settings for a custom object.
76Which statement about the lookup relationship between a custom object and a standard object is correct?
- AThe Lookup Relationship on the custom object can prevent the deletion of std object.
- BThe Lookup Relationship cannot be marked as required on the page layout for the custom object.
- CThe custom object will be deleted when the referenced std object is deleted.
- DThe custom object inherits security from the referenced std object.
77A 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?- ACreate a required comments field.
- BCreate a formula field.
- CCreate a validation rule.
- DCreate a required VF component.
78The 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?- ACreate a Workflow Rule on the Opportunity object that updates a field on the parent Account.
- BCreate a formula field on the account object that performs a MAX on the opportunity close date field.
- CCreate a roll-up summary field on the account object that performs a MAX on the Opportunity Close Date field.
- DCreate a trigger on the Account object that queries the close date of the most recent Opportunities.
79A developer needs to create records for the object Property__c. The developer creates the following code block :
List<Property_c> propertyToCreate = helperClass.createProperties();
Try {
}catch(Exception exp) {
// Exception HAndling
}
Which line of code would the developer insert at line 03 to ensure that at least some records are created, even if a few records have errors and fails to be created?- ADatabase.insert(propertyToCreate);
- BDatabase.insert(propertyToCreate, System.ALLOW_PARTIAL);
- CInsert propertyToCreate;
- DDatabase.insert(propertyToCreate, false);
80On which object can an administrator create a roll-up summary field?
- AAny object that is on the master side of a master – detail relationship.
- BAny object that is on the parent side of a lookup relationship.
- CAny object that is on the detail side of a master – detail relationship.
- DAny object that is on the child side of a lookup relationship.
81What is a valid source and destination pair that can send or receive change sets?
Choose 2 answers- ASandbox to production.
- BDeveloper edition to sandbox.
- CSandbox to sandbox.
- DDeveloper edition to production.
82A 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?- ABy using SOQL on the visualforce page to query for data from the parent record.
- BBy using merge field syntax to retrieve data from the parent record.
- CBy adding a second standard controller to the page for the parent record.
- DBy using a roll-up formula field on the child record to include data from the parent record.
83A 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?- AIn a Controller Extension.
- BIn a Custom Controller.
- CIn a Standard Controller.
- DIn a Standard Extension.
84A developer wants to list all of the Tasks for each Account on the Account detail page.
When a Task created for a contact, what does the developer need to do to display the task on the related account record?- ACreate an Account formula field that displays the task information.
- BNothing The task Is automatically displayed on the account page.
- CCreate a workflow rule to relate the task to the contact’s account.
- DNothing. The task cannot be related to an account and a contact.
85What is a capability of a StandaradSetController?
Choose 2 Answers.- AIt extends the functionality of a standard or custom controller.
- BIt allows pages to perform mass updates of records.
- CIt allows page to perform pagination with large record sets.
- DIt enforces field-level security when reading large record sets.
86A developer has the following code.
Try{
List<String> 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 would be logged?- ANo message is logged.
- BGeneric Exception
- CList Exception
- DNullPointer Exception
87Which statement about change set deployments is accurate?
Choose 3 answers- AThey can be used only between related organizations.
- BThey require a deployment connection.
- CThey use an all or none deployment model.
- DThey can be used to transfer Contact records.
- EThey can be used to deploy custom settings data.
88How would a developer use schema builder to delete a custom field from the account object that was required for prototyping but is no longer needed?
- ARemove all the references in the code and then the field will be removed from schema builder.
- BRemove all references from the code and then delete the custom field from schema builder.
- CMark the field for deletion in schema builder and then delete it from the declarative UI.
- DDelete the field from schema builder and then all references in the code will be removed.
89What is an accurate statement about variable scope?
Choose 3 answers.- ASub-blocks cannot reuse a parent block’s variable name.
- BA variable can be defined at any point in a block.
- CParallel blocks can use the same variable name.
- DSub-blocks can reuse a parent block’s variable name if its value is null.
- EA static variable can restrict the scope to the current block if its value is null.
90When the value of a field in an account record is updated. which method will update the value of a custom field related opportunities?
Choose 2 answers.- AAn apex trigger on the Account object.
- BA process Builder on the Account object.
- CA cross-Object formula field on the account object.
- DA workflow rule on the account object.
91A 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?- AAdd the TestVisible attribute to the Apex class.
- BAdd the SeeAllData attribute to the test methods.
- CAdd the SeeAllData attribute to the test class.
- DAdd the TestVisible attribute to the Apex methods.
92Which scenario is invalid for execution by unit tests?
- AExecution methods for negative test scenarios.
- BExecution methods as different users.
- CLoading the data in place of user input for Flows.
- DLoading the Standard pricebook ID using a system method.
93A developer runs the following anonymous code block:
List<Account> acc = [SELECT Id From Account Limit 10];
Delete acc;
Database.emptyRecycleBin(acc);
System.debug(Limits.getDMLStatements()+’,’+Limits.getLimitDMLStatements()));
What is the result ?- A11,150
- B150,2
- C150,11
- D2,150
94Where can custom roll-up summary fields be created using standard object relationships?
Choose 3 answers.- AOn Account using Case records.
- BOn Account using Opportunity records.
- COn Opportunity using Opportunity Product records.
- DOn Quote using Order records.
- EOn campaign using Campaign member records.
95A 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”?- AA contact with empty values.
- BA contact initialized to null.
- CAn empty List of Contacts.
- DAn error that no rows are found.
96What is an important consideration when developing in a multi-tenant environment?
- APolyglot persistence provides support for a global, multilingual user base in multiple orgs on multiple instances.
- BGovernor limits prevent tenants from impaction performance in multiple orgs on the same instance.
- CUnique domain names take the place of namespaces for code developed for multiple orgs on multiple instances.
- DOrg-wide data security determines whether other tenants can see data in multiple orgs on the same instance.
97In the Lightning Component framework, which resource can be used to fire events?
Choose 2 answers- AVisualforce controller actions
- BThird party web service code
- CThird party Javascript code
- DJavascript controller action.
98What is a capability of formula fields?
Choose 3 answers.- ADisplay the previous value for a field using the PRIORVALUE function.
- BReturn and display a field value from another object using the VLOOKUP function.
- CDetermine which of three different images to display using the IF function.
- DGenerate a link using the HYPERLINK function to a specific record in a legacy system.
- EDetermine if datatime field has passed using the NOW function.
99A developer has a block of code that omits any statements tha indicte whether the code block should execute or without sharing.
What will automatically obey the organization-wise defaults and sharing settings for the user who excecutes the function in salesforce organization?- AAnonymous Blocks
- BApex Controllers
- CHTTP Callouts
- DApex Triggers
100In a Single record, a user selects multiple value from a multi-select picklist.
How are the selected values represented in apex?- AAs a String with each value separated by a comma.
- BAs a List<String> with each value as an element in the list.
- CAs a String with each value separated by a semicolon.
- DAs a set<String> with each value as an element in the set.
101What is capability of the Force.com IDE?
Choose 2 answers- AEdit metadata components.
- BRun Apex tests.
- CDownload debug Logs.
- DRoll back deployments.
102A 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’s profile and display this org’s 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]}
103A developer writes a SOQL query to find child records for a specific parent.
How many levels can be returned in a single query?- A3
- B5
- C1
- D7
104A developer needs to know if all tests currently pass in a salesforce environment.
Which feature can the developer use?
Choose 2 answers- ADeveloper Console.
- BANT Migration Tool.
- CSalesforce UI Apex Test Execution
- DWorkbench Metadata Retrieval.
105Which statement should a developer avoid using inside procedural loops?
Choose 2 answers- ASystem.debug(‘Amount of CPU time (in ms) used so far :’+ Limits.getCpuTime());
- BUpdate contactList;
- CList<Contact> contacts = [select is, salutation,firstname……]
- DIf(o.accountid==a.id)
106Which statement would a developer use when creating test data for products and pricebooks?
- AList objList = Test.loaddata(Account.sObjectType,’myResource’);
- BPricebook pb = new pricebook();
- CId pricebookid = Test.getStandardPricebookid();
- DIsTest(SeeAllData=false)
107How can a developer determine, from the DescribeSobjectResult,if the current user will be able to create record an object in apex?
- ABy using the has Access() method.
- BBy using the isCreatable() method.
- CBy using the isInsertable() method.
- DBy using the canCreate() method.
108Why would a developer use Test.startTest() and Test.stopTest()?
- ATo start and stop anonymous block execution when executing anonymouns apex code.
- BTo indicate test code so that it does not impact apex line count governor limits.
- CTo create an additional set of governor limits during the execution of a single test class
- DTo avoid apex code coverage requirement for the code between these lines.
109A developer need to provide a visualforce page that lets users enter product-specific details during a sales cycle.
How can this be accomplished?
Choose 2 answers.- ADownload an unmanaged package from the appexchange that provides a custom visualforce page to modify.
- BCopy the standard page and then make n new visualforce page for product data entry.
- CCreate a new visualforce page and an apex controller to provide product data entry.
- DDownload a managed package from the App Exchange that provides a custom visualforce page to modify.
110What is a valid statement about Apex classes and interfaces?
Choose 2 answers- AException classes must end with the word exception.
- BA class can have multiple levels of inner classes.
- CThe default modifier for a class is private.
- DThe default modifier for an interface is private.
111A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce.
Which kind of relationship would a developer use to relate the account to the warehouse?- ALookup
- BParent-Child
- CMaster-Detail
- DOne to Many
112A candidate must apply to multiple jobs at the company Universal containers by submitting a single applications 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?- ACreate a master-detail relationship in the application custom object to the job postings custom object.
- BCreate a lookup relationship on both objects to a junction object called posting applications.
- CCreate a master detail relationship in the job postings custom object to the application custom object.
- DCreate a lookup relationship in the applications custom object to the job postings custom object.
113The sales management team requires that the Lead source field of the lead record be populated when a lead is converted.
What would a developer use to ensure that a user populates the lead source field is prior to converting a Lead?- AProcess builder
- BValidation Rule
- CFormula field
- DWorkflow rule.
114What is a correct pattern to follow when programming in Apex on multi-tenant platform?
- ADML is performed on one record at a time to avoid possible data currency issues.
- BQueries select the fewest fields and records possible to avoid exceeding governor limits.
- CApex code is created in a separate environment from schema to reduce deployment errors.
- DApex classes use the “with sharing” keyword to prevent access from other server tenants.
115When loading data into an organization, what can a developer do to match records to update existing records?
Choose 2 answers- AMatch an auto-generated Number field to a column in the imported file.
- BMatch the Id field to a column in the imported file.
- CMatch the Name field to a column in the imported file.
- DMatch an external Id Text field to a column in the imported file.
116A developer created an Apex trigger using the developer console and now wants to debug code.
How can the developer accomplish this in the developer console?- AOpen the logs tab in the developer console.
- BSelect the override log triggers checkbox for the trigger.
- CAdd the user name in the log Inspector.
- DOpen the progress tab in the developer console.
117Where can a developer create managed package?
- ADeveloper Edition.
- BDeveloper Sandbox.
- CEnterprise.
- DUnlimited.
118Where can a developer call external javascript?
Choose 2- A<link>
- B<apex:define>
- C<apex:includeScript>
- D<script>
119What is the advantage of Salesforce Lightning?
- APre defined components to give Standard Look and Feel.
- BUses service side for better handling.
120Which use case requires a partial copy or full sandbox?
Choose 3- AScalability Testing
- BDevelopment Testing
- CQuality-Assurance Testing
- DBatch Data Testing
- EIntegration Testing
121In Lightning component framework, where is the client-side controller logic contained?
- AApex
- BVisualforce
- CHTML
- DJavaScript
122A Developer creates a method in Apex class and needs to ensure that errors are handled properly. What would the developer use?
Choose 3- AApexPages.addErrorMessage()
- BA custom exception
- C.addError()
- DDatabase.handleException
- EA try/catch construct.
123What is valid in where clause of a SOQL query
Choose 2- AGeolocation field
- BEncrypted field
- CAggregate function
- DAlias notation
124What is the correct way to describe how Model-View-Controller (MVC) architecture is implemented on the Salesforce platform?
- AModel : Std and Custom Obj ; View : VF Page ; Controller : s-Controls
- BModel : Schema Builder ; View : List View ; Controller : Setup Console
- CModel : Std and Custom Obj ; View : VF Page ; Controller : Apex Code
- DModel : Apex Code ; View : List View ; Controller : Setup Console
125How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?
- ABy querying CustomObject__share
- BBy querying the role hierarchy
- CBy calling the isShared() method for the record
- DBy calling the profile settings of the current user
126A developer has completed work in the sandbox and is ready to send it to a related org, what deployment tool should be used?
- AChange Sets
- BForce.com IDE
- CUnmanaged Packages
- DForce.com Migration Tool
127What is the name of the standard relationship from Account down to Contact?
- AContact
- BAccounts
- CAccount
- DContacts
128What is a characteristic of the Lightning Component framework?
Choose 2 answers- AIt includes responsive components
- BIt works with existing Visualforce pages
- CIt uses XML as its data format
- DIt has an event-driven architecture
129Identify the field update limitations.
Choose 3- ARead-only fields like formula or auto-number fields aren't available for field updates.
- BIn a batch update, workflow is retriggered on all entities where there is a change
- CThe results of a field update can't trigger additional rules such as validation, assignment, auto-response, or escalation rules.
- DField updates that are executed as approval actions don't trigger workflow rules.
130Identify the standard Lightning components.
Choose 3- AVisualforce Page
- BCross Incorrect answers
- CList View
- DRich Text
- EDashboards
131When a user creates a record by using an object-specific create action, what feed item for that record appears?
Choose 3- AAs the first entry in the feed for the new record
- BIn the feed for the record on which the new record was created
- CIn the user profile feed for all users who can view the record
- DIn the Chatter feed of the first user who follows the record on which the record was created
- EIn the Chatter feed of the user who created the record
132Which permission is required to install and uninstall packages from Salesforce AppExchange?
- ADownload AppExchange Packages
- BUpload AppExchange Packages
- CManage Package Licenses
- DCreate AppExchange Packages
133What is a valid Apex statement?
- AMap conMap = (SELECT Name FROM Contact);
- BInteger w, x, y = 123, z = 'abc',
- CAccount[] acctList = new List<Account›{new Account()}
- Dprivate static constant Double rate = 775;
134How can a developer refer to, or instantiate, a PageReference in Apex?
Choose 2 answers- ABy using the Page object and a visualforce page name
- BBy using the ApexPages.Page() method with a visualforce page name
- CBy using a pageReference with a partial or full URL
- DBy using the PageReference.page() method with a partial or full URL
135What is a lightning page?
- AA page you can access via a customer community.
- BThe new name for a Salesforce page layout.
- CA custom layout for creating pages in Salesforce1.
- DA compact, configurable, and reusable element.
136In order to create an App Launcher component in lightning what must an admin do?
- AContact Salesforce to have the component activated for the Lightning App Builder.
- BNavigate to Setup-Customize-User Interface to enable the component for the Lightning App Builder.
- CPurchase a license for the Lightning App Builder.
- DJoin the pilot Lightning App Builder team
137The Review_c object have a lookup relationship to the job_Application_c object.The job_Application_c object has a master detail relationship up to the position_c object.The relationship is based on the auto populated defaults?
What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?- AUtilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
- BUtilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.
- CUtilize the Standard Controller for Position_c and a Controller Extension to query for Review _ C data.
- DUtilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through me Job_Applicacion_c inject.
138Which API cannot be used to create the data model?
- AForce.com Single Sign-on API
- BAJAX Tookit for Force.com
- CForce.com Metadata API
- DForce.com API
139To enable the Publisher Actions area on Page Layouts, navigate to:
- ASetup | Customize | Feeds | Settings
- BSetup | Customize | Chatter | Settings
- CSetup | Customize | Actions | Settings
- DSetup | Customize | <Objects> | Settings
140What is an accurate statement about with sharing keyword?
Choose 2 answers:- ABoth inner and outer classes can be declared as with sharing
- BEither inner or outer classes can be declared as with sharing, but not both
- CInner classes inherit the sharing setting from the container class
- DInner classes do not inherit the sharing setting from the container class
141What is true when a field update is set to re-evaluate the workflow rule?
Choose three- AIn a batch update, workflow is only retriggered on the entities where there is a change.
- BOnly workflow rules on the same object as the initial field update will be re-evaluated and triggered.
- CAny workflow rules whose criteria are met as a result of the field update will be ignored.
- DOnly workflow rules that didn’t fire before will be retriggered.
- ECascade of workflow rule re-evaluation and triggering can happen up to ten times after the initial field update that started it.
142Which social networks are available in the Lightning Experience and Salesforce1?
- AFacebook
- BLinkedIn
- CKlout
- DTwitter
143When running an Apex test, which type of Apex syntax in tested code is counted in the code coverage calculation?
- AA blank line.
- BA System.debug() statement.
- CA variable assignment.
- DA comment.
144What is the result when a Visualforce page calls an Apex controller, which calls another Apex class, with then result! Multiple in hitting a governor limit?
- AAny changes up to the error are rolled back.
- BAny changes up to the error are saved.
- CAll changes before a savepoint are saved.
- DAll changes are saved in the first Apex class.
145You can create global actions to let users create which of the following records?
Choose three- AEvent (without invitees)
- BOpportunity
- CQuestion
- DChatter Posts
- EProducts
- FUsers
146Actions on a Lightning Page allow you to do which of the following?
- ASend email and delete or clone records.
- BSend email, create a task, and create or update records.
- CClone records, add users, and assign permissions.
- DSend email, send outbound messages, and launch a flow.
147When would a developer use a custom controller instead of a controller extension?
Choose 2- AWhen a Visualforce page needs to replace the functionality of a standard controller.
- BWhen a Visualforce page should not enforce permissions or field -level security.
- CWhen a Visualforce page does not reference a single primary object.
- DWhen a Visualforce page needs to add new actions to a standard controller.
148A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL
Which statement is unnecessary inside the unit test for the custom controller?- Apublic ExtendedController(ApexPages.StandardController cntrl) { )
- BApexPages.currentPage().getParameters() put(input', 'TestValue).
- CTest.setCurrentPage(pageRef),
- DString nextPage = controller.save().getUrl();
Información
- Descripción
- Salesforce Salesforce Test sobre Salesforce Dev 1 Exam Practice, creado por Jessica F el 19/04/2017.
- Autor
- Jessica F
- Idioma
- English
- Visitas
- 849
- Etiquetas
- Valoración
- 5,0 de 5 · 2 valoraciones Valora este test