Hawerth Castro
Test por , creado hace más de 1 año

Salesforce DEV 401 Quizzes Dumps preparing certified

167
0
0
Hawerth Castro
Creado por Hawerth Castro hace casi 7 años
Cerrar

SALESFORCE DEV-401 Certification Evaluation 2

Pregunta 1 de 59

1

What can a lightning component contain in its resource bundle?
Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • CSS styles scoped to the component.

  • Custom Client-side rendering behavior.

  • Build scripts for minification.

  • Properties files with global settings.

Explicación

Pregunta 2 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • The record owner, a user shared to the record, any user above the record owner in the role hierarchy administrator profile

  • The record owner, a user above the record owner in the role hierarchy, and a user with the system

  • Only the record owner and a user with the System Administrator profile

  • The record owner, a user with the System Administrator profile, and a user shared to the record.

Explicación

Pregunta 3 de 59

1

In the Lightning Component framework, which resource can be used to fire events?
Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Visualforce controller actions.

  • Third-party web service code.

  • Third-party JavaScript code.

  • JavaScript controller actions.

Explicación

Pregunta 4 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • Create an account formula field that display the task information.

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

  • Create a workflow Rule to relate the Task to the Contact`s Account.

  • Nothing. The Task cannot be related to an Account and a Contact.

Explicación

Pregunta 5 de 59

1

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?

Selecciona una de las siguientes respuestas posibles:

  • By using SOQL on the Visualforce page to query for data from the parent record.

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

  • By adding a second standard controller to the page for the parent record.

  • By using a roll-up formula field on the child record to include data from the parent record.

Explicación

Pregunta 6 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • 11, 150

  • 150, 2

  • 150, 11

  • 2, 150

Explicación

Pregunta 7 de 59

1

Which statement about change set deployments is accurate?

Choose 3 answers

Selecciona una o más de las siguientes respuestas posibles:

  • They can be used only between related organizations.

  • They require a deployment connection.

  • They use an all or none deployment model.

  • They can be used to transfer Contact records.

  • They can be used to deploy custom settings data.

Explicación

Pregunta 8 de 59

1

Which action can a developer perform in a before update trigger?

Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Update the original object using an update DML operation.

  • Delete the original object using a delete DML operation.

  • Change field values using the Trigger.new context variable.

  • Display a custom error message in the application interface.

Explicación

Pregunta 9 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • Create a required comments field.

  • Create a formula field.

  • Create a validation rule.

  • Create a required Visualforce component.

Explicación

Pregunta 10 de 59

1

What is a capability of formula fields?

Choose 3 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Display the previous value for a field using the PRIORVALUE function.

  • Return and display a field value from another object using the VLOOKUP function

  • Determine which of three different images to display using the IF function.

  • Generate a link using the HYPERLINK function to specific record in a legacy system.

  • Determine if a datetime field has passed using the NOW function.

Explicación

Pregunta 11 de 59

1

Where can a developer call external JavaScript in a Visualforce page?

Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • <apex:includeScript>

  • <link>

  • <apex:define>

  • <script>

Explicación

Pregunta 12 de 59

1

When 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.

Selecciona una o más de las siguientes respuestas posibles:

  • An apex trigger on the account object.

  • A process builder on the account object.

  • A cross-object formula field on the Account object.

  • A workflow rule on the account object.

Explicación

Pregunta 13 de 59

1

What is the result of following code block?

integer x = 1;

integer y = 0;

while(x < 10){

y++;

}

What is the output?

Selecciona una de las siguientes respuestas posibles:

  • Error

  • 9

  • 0

  • 10

Explicación

Pregunta 14 de 59

1

What features are available when writing apex test classes?

Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • The ability to select error types to ignore in the developer console.

  • The ability to write assertions to test after a @future method.

  • The ability to set and modify the CreatedDate field in apex tests.

  • The ability to set breakpoints to freeze the execution at a given point.

  • The ability to select testing data using .csv files stored in the system.

Explicación

Pregunta 15 de 59

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?

Selecciona una de las siguientes respuestas posibles:

  • 3

  • 5

  • 1

  • 7

Explicación

Pregunta 16 de 59

1

A developer needs to know if all tests currently pass in a Salesforce environment. Which feature can the developer use?

Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Developer console

  • ANT Migration Tool

  • Salesforce UI Apex Test Execution.

  • Workbench Metadata Retrieval

Explicación

Pregunta 17 de 59

1

Which of these statements are true about the "view state" inspector?
Select all that apply.

Selecciona una o más de las siguientes respuestas posibles:

  • Shows components contributing to view state

  • Must be enabled on a user profile

  • Is displayed only when using <apex: form>

  • Is controlled by the Role Hierarchy

Explicación

Pregunta 18 de 59

1

Which statement would a developer use when creating test data for products and pricebooks?

Selecciona una de las siguientes respuestas posibles:

  • List Object = Test.loadData(Account.sOjbectType, 'myResource');

  • Pricebook pb = new Pricebook();

  • Id pricebookId = Test.getStandardPricebookId();

  • IsTest(seeAllData=false)

Explicación

Pregunta 19 de 59

1

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

Selecciona una de las siguientes respuestas posibles:

  • Any object that is on the master side of a master-detail relationship.

  • Any object that is on the parent side of a lookup relationship.

  • Any object that is on the detail side of a master-detail relationship.

  • Any object that is on the child side of a lookup relationship.

Explicación

Pregunta 20 de 59

1

Which code block returns the listview of an Account object using the following debug statement?

system.debug(controller.getListViewOptions());

Selecciona una de las siguientes respuestas posibles:

  • ApexPages.StandardSetController controller = new Apexpages.StandardSetController([SELECT id FROM Account LIMIT 1]);

  • ApexPages.StandardController controller = new ApexPages.StandardController

    (Database.getQueryLocator('select id from account limit 1')).

  • ApexPages.StandardController controller = new ApexPages.StandardController ([SELECT id FROM Account LIMIT 1]);

  • ApexPages.StandardSetController controller = new

    ApexPages.StandardSetController(database.getQueryLocator('select id from Account Limit 1')).

Explicación

Pregunta 21 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • No message is logged

  • Generic Exception

  • List Exception

  • NullPointer Exception

Explicación

Pregunta 22 de 59

1

Which user can edit a record after it has been locked for approval?

Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • An administrator.

  • Any user who approved the record previously.

  • A user who is assigned as the current approver.

  • Any user with a higher role in the hierarchy.

Explicación

Pregunta 23 de 59

1

Visualforce components are similar to which type of tag library containing tag namespace prefixes?

Selecciona una de las siguientes respuestas posibles:

  • ASP tag library

  • JSP tag library

  • ASP log file

  • DL JSP log file

Explicación

Pregunta 24 de 59

1

Which of these statements is true for encrypted custom fields?
Select all that apply.

Selecciona una o más de las siguientes respuestas posibles:

  • Encrypted fields can be included in Search results.

  • Encrypted fields can be included in report results.

  • Encrypted fields are not available in filters for list views, reports, and Roll-up summary fields.

  • Encrypted fields are not available for validation rules or Apex scripts.

Explicación

Pregunta 25 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • By using ApexMessage.Message() to display an error message after the number of DML

  • By using Messaging.sendEmail() to continue the transaction and send an alert to the user after the number of DML statements is exceeded.

  • By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of DML statements is Exceeded

  • By using limits.getDMLRows() and then displaying an error message before the number of DML statement exceeded

Explicación

Pregunta 26 de 59

1

Which declarative method helps ensure quality data?

Choose 3 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Exception handling.

  • Workflow alerts.

  • Validation rules.

  • Lookup filters.

  • Page layouts.

Explicación

Pregunta 27 de 59

1

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's profile and display this Visualforce page?

Selecciona una de las siguientes respuestas posibles:

  • {!$Setup.Url_Settings__c.Instance[Profile.Id].URL_CC}

  • {!$Setup.Url_Settings__c.URL__c}

  • {!$Setup.Url_Settings__c[Profile.Id].URL__c}

  • {!$Setup.Url_Settings__c[$Profile.Id].URL__c}

Explicación

Pregunta 28 de 59

1

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”?

Selecciona una de las siguientes respuestas posibles:

  • A contact with empty values.

  • A contact initialized to null.

  • An empty list of contacts.

  • An error that no rows are found.

Explicación

Pregunta 29 de 59

1

Which developer tool can be used to create a data model?
Select all that apply.

Selecciona una o más de las siguientes respuestas posibles:

  • Schema Builder

  • Force.com Data Loader

  • Application Data Model wizard

  • Force.com IDE

Explicación

Pregunta 30 de 59

1

What is the proper process for an apex unit test?

Selecciona una de las siguientes respuestas posibles:

  • Query for test data using SeeAllData =true. Call the method being tested. Verify that the results are correct.

  • Create data for testing. Execute runAllTests(). Verify that the results are correct.

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

  • Query for test data using SeeAllData = true. Execute runAllTests(). Verify that the results are correct.

Explicación

Pregunta 31 de 59

1

How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?
Select all that apply.

Selecciona una o más de las siguientes respuestas posibles:

  • By calling the isShared() method for the record.

  • By querying the role hierarchy.

  • By querying CustomObject__share.

  • By calling the profile settings of the current user.

Explicación

Pregunta 32 de 59

1

What is an accurate statement about variable scope?

Choose 3 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Sub-block cannot reuse a parent block`s variable name.

  • A variable can be defined at any point in a block.

  • Parallel blocks can use the same variable name.

  • Sub-blocks can reuse a parent block’s variable name if their value is null.

  • A static variable can restrict the scope to the current block if its value is null.

Explicación

Pregunta 33 de 59

1

Which data type or collection of data types can SOQL statements populate or evaluate to?

Choose 3 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • A Boolean.

  • An integer.

  • A List of SObjects

  • A single SObject

  • A string

Explicación

Pregunta 34 de 59

1

Which scenario is invalid for execution by unit tests?

Selecciona una de las siguientes respuestas posibles:

  • Executing methods for negative tests scenarios.

  • Executing methods as different users.

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

  • Loading the standard pricebook ID using a system method.

Explicación

Pregunta 35 de 59

1

What is a good practice for a developer to follow when writing a trigger?
Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Using the Map data structure to hold query results by ID.

  • Using @ future methods to perform DML operations.

  • Using the Set data structure to ensure distinct records.

  • Using synchronous callouts to call external systems.

Explicación

Pregunta 36 de 59

1

What is a capability of the Force.com IDE?
Choose 2

Selecciona una o más de las siguientes respuestas posibles:

  • Edit metadata components.

  • Run Apex tests.

  • Download debug logs.

  • Roll back deployments

Explicación

Pregunta 37 de 59

1

Universal 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?

Selecciona una de las siguientes respuestas posibles:

  • Indirect Lookup Relationship

  • External Lookup Relationship

  • Hierarchical Relationship

  • Lookup Relationship

  • Master-Detail Relationship

Explicación

Pregunta 38 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • A custom Web service

  • A "before insert" Trigger

  • A custom Visualforce controller

  • A client-side S-control

Explicación

Pregunta 39 de 59

1

Where can debug log filter settings be set?
Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • The Filters link by the monitored user's name within the web UI.

  • The show more link on the Debug log's record.

  • On the monitored user's name.

  • The log filters tab on a class or trigger detail page.

Explicación

Pregunta 40 de 59

1

Which type of information is provided by the checkpoints tab in the developer Console?
Choose2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • Exception

  • Debug statement.

  • Namespace

  • Time

Explicación

Pregunta 41 de 59

1

How 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');

Selecciona una de las siguientes respuestas posibles:

  • 100

  • 102

  • 0

  • 101

Explicación

Pregunta 42 de 59

1

What is a capability of a StandardSetController?
Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • It extends the functionality of a standard or custom controller.

  • It allows pages to perform mass updates of records.

  • It allows pages to perform pagination with large record sets.

  • It enforces fields-level security when reading large record sets.

Explicación

Pregunta 43 de 59

1

What is an important consideration when developing in a multi-tenant environment?

Selecciona una de las siguientes respuestas posibles:

  • Polyglot persistence provides support for a global, multilingual user base in multiple orgs on multiple instances.

  • Governor Limits prevent tenants from impacting performance in multiple orgs on the same instance.

  • Unique domain name takes the place of namespaces for code developed for multiple orgs on multiple.

  • Org-wide data security determines whether other tenants can see data in multiple orgs on the same instances.

Explicación

Pregunta 44 de 59

1

In a single record, a user selects multiple values from a multi-select picklist.

How are the selected values represented in apex?

Selecciona una de las siguientes respuestas posibles:

  • As a string with each value separated by a comma.

  • As a List<string> with each value as an element in the list.

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

  • As a Set<String> with each value as an element in the set.

Explicación

Pregunta 45 de 59

1

A 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?

Selecciona una de las siguientes respuestas posibles:

  • Add the TestVisible attribute to the Apex class.

  • Add the SeeAllData attribute to the test methods.

  • Add the SeeAllData attribute to the test class.

  • Add the TestVisible attribute to the Apex methods.

Explicación

Pregunta 46 de 59

1

Which statement about the lookup Relationship between a custom object and a Standard object?

Selecciona una de las siguientes respuestas posibles:

  • The lookup relationship on the custom object can prevent the deletion of the standard object.

  • The lookup Relationship cannot be marked as required on the page layout for the custom.

  • The custom object will be deleted when the referenced Standard Object is deleted.

  • The custom object inherits security from the referenced Standard Object.

Explicación

Pregunta 47 de 59

1

How 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?

Selecciona una de las siguientes respuestas posibles:

  • Remove all the references in the code and then the field will be removed from Schema Builder.

  • Remove all references from the code and then delete the custom field from Schema Builder.

  • Mark the field for deletion in Schema Builder and then delete it from the declarative UI.

  • Delete the field from Schema Builder and then all references in the code will be removed.

Explicación

Pregunta 48 de 59

1

Where can custom roll-up summary fields be created using Standard object relationship?
Choose 3 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • On account using case records

  • On account using opportunity records.

  • On opportunity using opportunity product records.

  • On quote using order records.

  • On campaign using campaign member records.

Explicación

Pregunta 49 de 59

1

What happens when a workflow is re-evaluated?
Pick 3.

Selecciona una o más de las siguientes respuestas posibles:

  • Other Workflow types

  • Previous Workflows

  • Validation

  • Cross-object sharing rules

Explicación

Pregunta 50 de 59

1

Which statement about declarations is correct?

Selecciona una de las siguientes respuestas posibles:

  • A developer can use define constant with final keyword.

  • A developer can extend a class that is declared with virtual keyword

  • A developer can’t use class or method using final keyword

  • All of the above

Explicación

Pregunta 51 de 59

1

How can a developer determine, from the DescribeSobjectResult, if the current user will be able to create record an object in Apex?

Selecciona una de las siguientes respuestas posibles:

  • By using the hasAccess() method.

  • By using the isCreatable() method.

  • By using the isInsertable() method.

  • By using the canCreate() method.

Explicación

Pregunta 52 de 59

1

What is an accurate constructor for a custom controller named "MyController"?

Selecciona una de las siguientes respuestas posibles:

  • public MyController(){

    account = new Account();

    }

  • Public MyController(SObject obj){

    account = (Account) obj;

    }

  • public MyController(List<SObject> objects) {

    accounts = (List<Account>)objects;

    }

  • Public MyController(ApexPages.Standardcontroller stdcontroller) {

    account = (Account) stdcontroller.getRecord();

    }

Explicación

Pregunta 53 de 59

1

The 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?

Selecciona una de las siguientes respuestas posibles:

  • Process builder.

  • Validation rule.

  • Formula Field

  • Workflow rule.

Explicación

Pregunta 54 de 59

1

When can a developer use a custom Visualforce page in a Force.com Application?
Choose 2 answers.

Selecciona una o más de las siguientes respuestas posibles:

  • To create components for dashboards and layouts.

  • To deploy components between two organizations.

  • To generate a PDF document with application data.

  • To modify the page layout settings for a custom object.

Explicación

Pregunta 55 de 59

1

The 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?

Selecciona una de las siguientes respuestas posibles:

  • Create a work rules on the opportunity object that updates a field on the parent account.

  • Create a formula field on the account object that performs a MAX on the opportunity close date field.

  • Create a roll-up summary field on the account object that performs a MAX on the opportunity close date field.

  • Create a trigger on the Account object that queries the close date of the most recent opportunities.

Explicación

Pregunta 56 de 59

1

A 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.

Selecciona una o más de las siguientes respuestas posibles:

  • Create a roll-up summary field on the candidate object that counts interview records.

  • Create a master-detail relationship between the candidate and interview objects.

  • Create a lookup relationship between the candidate and interview objects.

  • Create a trigger on the interview object that updates a field on the candidate object.

Explicación

Pregunta 57 de 59

1

Which statement should a developer avoid using inside procedural loops?
Choose 2 answers

Selecciona una o más de las siguientes respuestas posibles:

  • System.debug('Amount of CPU time (in ms) used so far: '+ Limits.getCpuTime());

  • update contactList;

  • List<Contact> contacts = [select id,saluation, firstname, lastname, email from Contact where accountId = :a.Id];

  • if(o.accountid == a.id)

Explicación

Pregunta 58 de 59

1

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';

}

Selecciona una de las siguientes respuestas posibles:

  • B

  • C

  • D

  • A

Explicación

Pregunta 59 de 59

1

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?

Selecciona una de las siguientes respuestas posibles:

  • In a Controller Extension.

  • In a Custom Controller.

  • In a Standard controller.

  • In a Standard Extension.

Explicación