Preparazione Salesforce Certified Platform Developer I

Argomenti da studiare per la Platform Developer I

  • Salesforce fundamentals: 7%
  • Data modeling and management: 13%
  • Process automation and logic: 38%
  • User interface: 25%
  • Testing, debugging and deployment: 17%

Elenco domande e risposte probabili per la certificazione Platform Developer I in Salesforce

  1. From wich two locations can a developer determine the overall code coverage for a sandbox?
    The Tests tab of developer console
    The Apex classes setup page
  2. Requirements state that a child record be deleted when its parent is deleted, and child can be moved to a different parent when necessary. Which type of relationship should be built between the parent and child objects in Schema Builder to support these requirements?
    Master-Detail Relationship
  3. Opportunity opp = [select id,stagename from opportunity limit 1];
    Given the code above, how can a developer get the label for stagename field?
    Call Opportunity.StageName.getDescribe().getLabel();
  4. How can a developer set up a debug log on specific user?
    Set up a trace flag for the user, and define a loggin level and time period for the trace
  5. Which declarative process automation feature supports iterating over multiple records?
  6. A developer uses an after update trigger on the account object to update all the contacts related to the account. the trigger code shown below is randomly failing
    List<Contact> theContacts = new List<Contact>();
    for (Account a: Trigger.New){
    for (Contact c:[select id,account_dat_c from contact where accountId]){
    c.account_date_c =;
    update theContacts
    An exception is thrown if account_date_c is null
  7. Which type of code represents the mode in the mcv architecture one platform?
    A list of account records returned from a controller extension method
  8. What is a key difference betwwen a master-detail relationship and lookup relationship?
    A master-detail relationship detail record inherits the sharing and security of its master record
  9. Which two components ara avaible to deploy using the metadata api?
    Lead conversion settings
    Case settings
  10. A developer needs to provide a way to mass edit, update and delete records from a list view.
    In which two ways can this be accomplished?
    Donwload a managed package from AppExchange that provides customizable enhanced list views and buttons
    Create a new visualforce page and apex controller for the list view that provide mass edit, update and delete functionality
  11. How many levels of child records can be returned in a single SOQL query from one parent object?
  12. Given the code block
    Integer x;
    if(x==8) break;
    if(x==10) break;
    which value will the system.debug statement display?
  13. A platform developer needs to write an apex method that will only perform an action if a record is assigned to a specific record type
    Which two options allow the developer to dynamically determine the ID of the required Record Type by it is name?
    Use the getRecordTypeInfosByDeveloperName() method in the DescribeSObjectResult class
    Execute a SOQL query on the RecordType object
  14. A developer wants to store a description of a product than can be entered on separate lines by a user during product setup and later displayed on visualforce page for shoppers
    Which field type should the developer choose to ensure that the description will be searchable in the custom Apex SOQL queries tha are written?
    Text Area
  15. A developer needs to create a visulaforce button for the opportunity object page layout that will cause a web service to be called and redirect the user to a new page when clicked.
    Which three attributes need to be defined in the <apex:page> tag of the visualforce page to enable this functionallity
  16. Which option should a developer user to create 500 Accounts and make sure that duplicates are not created for existing Account Sites?
    Data Loader
  17. Manage packages can be created in which type of org?
    Developer Edition
  18. What are two benefits of the lightning component framework?
    it promotes faster develpment usin out-of-the-box components that are suitable for desktop and mobile devices
    it provides an event-driven architecture for better decoupling between components
  19. A developer created a visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page. What should the developer do to deploy to production?
    Create a test class that provides coverage of the custom controller
  20. Which two statements can a developer use to throw a custom exception of type MissingFieldValueExpection?
    throw new MissingFieldValueException();
    throw new MissingFieldValueException(‘Problem occured’);
  21. A developer working on a time managment application wants to make total hours for each timecard available to application user. A timecard entry has a master-detail relationship to a timecard. Which approach should the developer use to accomplish this declaratively?
    A roll-up summary field on the timecard object that calculate the total hours from timecard entries for that timecard
  22. Wich statement is true about developing in a multi-tenant environment?
    Governor limits prevent apex from impacting the performance of multiple tenants on the same instance
  23. A developer needs to find information about @future methods that were invoked. From which system monitoring feature can the developer see this information?
    Apex Jobs
  24. What is considered the primary purpose for creating Apex test?
    To ensure every use case of the application is covered by a test
  25. A developer declared a class as follows
    public class wysiwyg{
    // property and methods including DML
    which invocation of a class method will obey the organization-wide defaults and sharing settings for the running user in salesforce organization?
    A developer using the developer console that invokes a method in this class from the execute anonymous windows
  26. A developer wants to use all of the functionallity provided by the standard controller for an object, but needs to override the save standard action in a controller extension. Which two are required in the controller extension class?
    Define the class with a constructor that takes an instance of StandardController as a parameter
    Create a method named Save with a return data type of PageReference
  27. The sales team at universal containers would like to see a visual indicator appear on both Account and opportunity page layout to alert salespeople when an account is late making payments or has entered the collections process. What can a developer implement to achieve this requirement without having to write custom code?
    Formula Field
  28. A developer needs to create an audit trail for records that are sent to the recycle bin. Which type of trigger is most appropriate to create?
    Before Delete
  29. Which two condition cause workflow rules to fire?
    Updating records using the bulk API
    An Apex Batch process that changes field values
  30. A developer wants to handle the click event for a lightning:button component.
    The onclick attribute for the component references a javascript function in which resource in the component bundle?
  31. The Account object has a custom formula field, Level__c, that is defined as a formula (number) with two decimal places. Which three are valid assignments?
    object mylevel = acct.Level__c
    double mylevel = acct.Level__c
    decimal mylevel = acct.Level__c
  32. how can a developer use a Set<id> to limit the number of records returned by a SOQL query?
    Reference the Set in the Where clause of the query
  33. What is a benefit of using a trigger framework?
    Simplifies addition of context-specific logic
  34. which two roll-up summary field types are required to find the average of values on detail records in a mester-detail relationship?
    Roll-up summary field of type SUM
    Roll-up summary field of type COUNT
  35. For which example task should a developer use a trigger rather than a workflow rule?
    To set the primary contact on an account record when it is saved
  36. When a task is created for a contact, how can a developer prevent the task from being included on the activity timeline of the contact’s account record?
    by default, task do not display on the account activity timeline
  37. A developer has the following class and trigger code
    public class InsuranceRates{
    public static final decimal smokerCharge = 0.01;
    trigger ContactTrigger on Contact(before insert){
    Insurancerates rates = new InsuranceRates();
    Decimal baseCost = xxx;
    Wich code segment should a developer insert in xxx to set the baseCost variable to the value of the class variable smokerCharge?
  38. A change set deployment from a sandbox to production fails due to a failure in a managed package unit test. The developer spoke with the managed package owner and they determined it is a false positive and can be ignored. What should the developer do to sucessfully deploy?
    select run local tests to run all tests in the org that are not in the managed package
  39. A developer needs to include a visualforce page in the detail section of a page layout for the account object, but does not see the page as an available option in the page layout editor. Which attribute must the developer include in the <apex:page> tag to ensure the visualforce page can be embedded in a page layout?
  40. Which two stantments are true regarding formula field?
    When concatenating fields, line breaks can be added to improve readability
    Fields that are referenced by a formula field can not be deleted until the formula is modified o deleted
  41. A developer needs an apex method that can process account or contact records
    Which methode signature should developer use?
    public void doWork(sObject theRecord)
  42. Which is valid apex assignment?
    Double x = 5;
  43. How can a developer warn users of SOQL governor limit violation in a trigger?
    Use Limits.getQueries() and display an error message before the number of SOQL queries exceeds the limit
  44. Which two SOSL searches will return records matching search criteria contained in any of the searchable text fields on an object?
    [ FIND ‘Acme*’ IN ALL FIELDS RETURNING Account,Opportunity ]
    [FIND ‘Acme*’ RETURNING Account,Opportunity]
  45. Which two queries can a developer use in a visualforce controller to protect against SOQL injection vulnerabilities?
    String qryName = '%' + name + '%';
    String qryString = 'Select id from contact where name like :qryName';
    List<contact> queryResult = Database.query(qryString);
    String qryName = String.escapeSingleQuote(name);
    String qryString = 'Select id from contact where name like \'%' + qryName + '%\'';
    List<contact> queryResult = Database.query(qryString);
  46. A devoloper wants to display all of the picklist entries for the opportunity stageName field and all of the avaible record types for the opportunity object on a visualforce page
    Use Schema.RecordTypeInfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos()
    Use Schema.PickListEntry returned by Opportunity.stageName.getDescribe().getPickListValues
  47. Which tag should a developer include when styling form external css is required in a visualforce page?
  48. Which two statements are acceptable for a developer to use inside procedural loops?
    Contact con = new Contact();
  49. A developer uses a test setup method to create Account named ‘Test’. the first test method deletes the account record
    What must be done in the second method to use the Account?
    Use SELECT id from Account where name = ‘test’
  50. Which two statements are true about Apex Code executed in Anonymous Block?
    Successful DML operation are automtically committed
    The code runs with the permission of the logged user
  51. An Account trigger updates all related Contacts and cases each time an account is saved using the following two DML statements
    update allContacts;
    What is the result if th case update exceeds the governor limit for maximun number of DML records?
    the account save fails and no contact or cases are updated
  52. An apex transaction inserts 100 Account records and 2000 contact records before encountering a DML exception when attempting to insert 500 opportunity record
    The account records are inserted by calling the database.insert() method with the allOrNone argument set to false. The Contact and Opportunity records are inserted using the standalone insert statement.
    Home many total record will be committed to the database in this transiction?

  53. A company want to create an employee rating program tha allows employees to rate each other. an employee’s average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records
    Which two action should a developer take to accomplish this task?
    Create a lookup relationship between the rating and employee object
    Create a trigger on the rating object that updates a field on the employee object
  54. A visualforce page uses the Contact standard controller . How can a developer display the name from the parent Account record on the page?
    Use the {!contact.Account.Name} merge field syntax
  55. In the code below, which type does String inherit from?
    string s = 'Hello world';
  56. Which two practices should be used for processing records in a trigger?
    Use a map to reduce the number of SOQL calls
    Use a set to ensure unique values in a query filter
  57. A company has a custom object named Region. Each account in salesforce can only be related to one region at the time, but this relationship is optional.
    Which type of relationship should a developer use to relate an Accoutn to region?
  58. Which two ways can a developer instantiate a pagereference in apex?
    By using ApexPage.currentpage()
    By using an object standard controller action
  59. Which two approches optimize test maintainance and support future declarative configuration changes? Choose 2 answers
    Create a method that loads valid account records from a static resource, then call this method within test methods
    Create a method that creates valid records, then call this method within test methods
  60. Which action can a developer take to reduce the execution time of the following code?
    List<account> allAccounts = [select id from account];
    List<contact> all contact = [select id from contact];
    for(Account a: allaccounts){
    for(contact c:allcontacts){
    if(c.accountId ={
    // do work
    Add a GROUP BY clause to the Contact SOQL
  61. Given the code below, what can be done so that recordCount can be accessed by a test class, but not by a non-test class?
    public class mycontroller{
    private Integer recordCount;
    Add the TestVisible annotation to the mycontroller class
  62. Which statement is true about a hierarchical relationship as it pertains to user records?
    It uses a special lookup relationship to allow one User record to be related to another user record
  63. A developer wants a multiple test classes to use the same set of test data. How should the developer create the test data?
    reference a test utility class in each test class
  64. Which three stantments are true regarding the @isTest annotation?
    Profile are visible in a test even if a class is annotated @isTest(SeeAllData=false)
    A method annotated @isTest(SeeAllData = false) in a class annotated @isTest(SeeAllData=true) has access to all org data
    A class containing test methods counts toward the Apex code limit regardless of any @isTest annotation
  65. Candidates are reviewed by four separate rviewers and their comments and scores which range from 1 (lowest) to 5 (highest) are stored on a review record that is a detail record for candidate. What is the best way to indicate that a combined review score of 15 or better is required to recommend that the candidate come in for an interview?
    Use a rollup summary field to calculates the sum of the review scores, and store this in a total score field on the candidate
  66. A deveoper needs to import customer subscription records into salesforce and attach them to existing account records. Which two actions should the developer take to ensure the subscription records are related to the correct account records?
    Match the id field to a column in the imported file
    Match an external id text field to a column in the imported file
  67. Which feature should a developer use to update an inventory count on relatd product records when the status of an order is modified to indicate it is fullfilled?
    Process Builder Process
  68. What can be used to delete components from production?
    An ant migration tool deployment whit a destructiveChanges XML file and the components to delete in the package.xml file
  69. What is the debug output of the following Apex Code?
    Decimal theValue;