Quiz
SALESFORCE DEV-401 Certification Evaluation 2
Questions in this quiz (59)
1What can a lightning component contain in its resource bundle?
Choose 2 answers.- ACSS styles scoped to the component.
- BCustom Client-side rendering behavior.
- CBuild scripts for minification.
- DProperties files with global settings.
2A custom object has an organization-wide default setting of private with Grant Access Using Hierarchies check box turned off. Which users can select the Sharing button on record for that object?
- AThe record owner, a user shared to the record, any user above the record owner in the role hierarchy administrator profile
- BThe record owner, a user above the record owner in the role hierarchy, and a user with the system
- COnly the record owner and a user with the System Administrator profile
- DThe record owner, a user with the System Administrator profile, and a user shared to the record.
3In 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 actions.
4A 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 records?
- ACreate an account formula field that display 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.
5A 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.
6A 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
7Which 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.
8Which 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.
9A reviewer is required to enter a reason in the comments field only when a candidate is 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 Visualforce component.
10What 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 specific record in a legacy system.
- EDetermine if a datetime field has passed using the NOW function.
11Where can a developer call external JavaScript in a Visualforce page?
Choose 2 answers.- A<apex:includeScript>
- B<link>
- C<apex:define>
- D<script>
12When 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.
13What is the result of following code block?
integer x = 1;
integer y = 0;
while(x < 10){
y++;
}
What is the output?- AError
- B9
- C0
- D10
14What features are available when writing apex test classes?
Choose 2 answers.- AThe ability to select error types to ignore in the developer console.
- BThe ability to write assertions to test after a @future method.
- CThe ability to set and modify the CreatedDate field in apex tests.
- DThe ability to set breakpoints to freeze the execution at a given point.
- EThe ability to select testing data using .csv files stored in the system.
15A 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
16A 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
17Which of these statements are true about the "view state" inspector?
Select all that apply.- AShows components contributing to view state
- BMust be enabled on a user profile
- CIs displayed only when using <apex: form>
- DIs controlled by the Role Hierarchy
18Which statement would a developer use when creating test data for products and pricebooks?
- AList Object = Test.loadData(Account.sOjbectType, 'myResource');
- BPricebook pb = new Pricebook();
- CId pricebookId = Test.getStandardPricebookId();
- DIsTest(seeAllData=false)
19On 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.
20Which code block returns the listview of an Account object using the following debug statement?
system.debug(controller.getListViewOptions());- 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')).
21A 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
22Which user can edit a record after it has been locked for approval?
Choose 2 answers.- AAn administrator.
- BAny user who approved the record previously.
- CA user who is assigned as the current approver.
- DAny user with a higher role in the hierarchy.
23Visualforce components are similar to which type of tag library containing tag namespace prefixes?
- AASP tag library
- BJSP tag library
- CASP log file
- DDL JSP log file
24Which of these statements is true for encrypted custom fields?
Select all that apply.- AEncrypted fields can be included in Search results.
- BEncrypted fields can be included in report results.
- CEncrypted fields are not available in filters for list views, reports, and Roll-up summary fields.
- DEncrypted fields are not available for validation rules or Apex scripts.
25A developer creates an apex helper class to handle complex trigger logic. How can the helper class warm users when the trigger exceeds DML governor limits?
- ABy using ApexMessage.Message() to display an error message after the number of DML
- 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 a custom Visualforce page before the number of DML statements is Exceeded
- DBy using limits.getDMLRows() and then displaying an error message before the number of DML statement exceeded
26Which declarative method helps ensure quality data?
Choose 3 answers.- AException handling.
- BWorkflow alerts.
- CValidation rules.
- DLookup filters.
- EPage layouts.
27A 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 Visualforce page?- A{!$Setup.Url_Settings__c.Instance[Profile.Id].URL_CC}
- 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}
28A 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.
29Which developer tool can be used to create a data model?
Select all that apply.- ASchema Builder
- BForce.com Data Loader
- CApplication Data Model wizard
- DForce.com IDE
30What 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 correct.
- BCreate data for testing. Execute runAllTests(). Verify that the results are correct.
- 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 the results are correct.
31How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?
Select all that apply.- ABy calling the isShared() method for the record.
- BBy querying the role hierarchy.
- CBy querying CustomObject__share.
- DBy calling the profile settings of the current user.
32What is an accurate statement about variable scope?
Choose 3 answers.- ASub-block 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 their value is null.
- EA static variable can restrict the scope to the current block if its value is null.
33Which data type or collection of data types can SOQL statements populate or evaluate to?
Choose 3 answers.- AA Boolean.
- BAn integer.
- CA List of SObjects
- DA single SObject
- EA string
34Which scenario is invalid for execution by unit tests?
- AExecuting methods for negative tests scenarios.
- BExecuting methods as different users.
- CLoading test data in place of user input for Flows.
- DLoading the standard pricebook ID using a system method.
35What is a good practice for a 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.
36What is a capability of the Force.com IDE?
Choose 2- AEdit metadata components.
- BRun Apex tests.
- CDownload debug logs.
- DRoll back deployments
37Universal containers has included its orders as an external data object into Salesforce. You want to create a relationship between Accounts and the Orders object (one-to-many relationship) leveraging a key field for account which is on both external object and Account. Which relationship do you create?
- AIndirect Lookup Relationship
- BExternal Lookup Relationship
- CHierarchical Relationship
- DLookup Relationship
- EMaster-Detail Relationship
38A customer wants to add a custom validation to the "contact save" process. Before a contact is created, the customer wants to include the validation, which checks if the associated account is active. This validation should be active for all UI as well as integration requests. Which design accomplishes this goal?
- AA custom Web service
- BA "before insert" Trigger
- CA custom Visualforce controller
- DA client-side S-control
39Where 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.
40Which type of information is provided by the checkpoints tab in the developer Console?
Choose2 answers.- AException
- BDebug statement.
- CNamespace
- DTime
41How many times does 'str' is added to the list?
List<String> strLst = new List<String>();
for(Integer i=0;i<99;i++) {
strLst.add('str'+i);
}
strLst.add('str'+'100');- A100
- B102
- C0
- D101
42What is a capability of a StandardSetController?
Choose 2 answers.- AIt extends the functionality of a standard or custom controller.
- BIt allows pages to perform mass updates of records.
- CIt allows pages to perform pagination with large record sets.
- DIt enforces fields-level security when reading large record sets.
43What 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 impacting performance in multiple orgs on the same instance.
- CUnique domain name takes the place of namespaces for code developed for multiple orgs on multiple.
- DOrg-wide data security determines whether other tenants can see data in multiple orgs on the same instances.
44In a single record, a user selects multiple values 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.
45A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private method 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.
46Which statement about the lookup Relationship between a custom object and a Standard object?
- AThe lookup relationship on the custom object can prevent the deletion of the standard object.
- BThe lookup Relationship cannot be marked as required on the page layout for the custom.
- CThe custom object will be deleted when the referenced Standard Object is deleted.
- DThe custom object inherits security from the referenced Standard Object.
47How 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.
48Where can custom roll-up summary fields be created using Standard object relationship?
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.
49What happens when a workflow is re-evaluated?
Pick 3.- AOther Workflow types
- BPrevious Workflows
- CValidation
- DCross-object sharing rules
50Which statement about declarations is correct?
- AA developer can use define constant with final keyword.
- BA developer can extend a class that is declared with virtual keyword
- CA developer can’t use class or method using final keyword
- DAll of the above
51How can a developer determine, from the DescribeSobjectResult, if the current user will be able to create record an object in Apex?
- ABy using the hasAccess() method.
- BBy using the isCreatable() method.
- CBy using the isInsertable() method.
- DBy using the canCreate() method.
52What is an accurate constructor for a 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(){
53The 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 prior to converting a lead?- AProcess builder.
- BValidation rule.
- CFormula Field
- DWorkflow rule.
54When can a developer use a custom Visualforce page in a 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.
55The sales management team hire 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 work rules 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.
56A company wants recruiting app that models candidates and interviews; displays 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 field on the candidate object.
57Which 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 id,saluation, firstname, lastname, email from Contact where accountId = :a.Id];
- Dif(o.accountid == a.id)
58What 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
59A 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.
Information
- Description
- Salesforce DEV 401 Quizzes Dumps preparing certified
- Author
- Hawerth Castro
- Language
- Português
- Views
- 223
- Tags
- Rating
- No ratings yet Rate this quiz