
SOSL Search
1. SOQL vs SOSL 차이점은?
Process Builder with an Autolaunched Flow
Process Builder vs flow vs Work flow 차이점?
Process builder
Create a master-detail relationship in the Application custom object to the Job Postings custom object.
5. Which declarative method helps ensure quality data? (Choose 3 answers)
Validation Rules
Lookup Filters
Page Layouts
6. An 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)
- Create a method that creates valid Account records & call this method from within test methods
- Create a method that loads valid account records from a static resource, and call this method within test methods
7. In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?
As a string with each value separated by a semi colon
8. A user selects a value from a multi-select picklist. How is this selected value represented in Apex?
As a string
9. What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?
Create a process with Process Builder
10. In a single record, a user selects multiple values form a multi-select picklist. How are the selected values represented in Apex?
As a String with each value separated by a semicolon
11. How can a custom type be identified as unique when added to a set ?
The class must implement the Equals and Hashcode methods
12. Which collection type provides unique key/value pairings of data?
Map
13. An Org has a single account named ’NoContacts’ that has no related contacts. Given the query:List<Account> accounts = [Select ID, (Select ID, Name from contacts) from Account where Name=“NoContacts’];
Accounts[0] contacts is an empty list.
14, Which two Apex data types can be used to reference a Salesforce record ID Dynamically? (Choose two answers)
String
sObject
15. A method is passed a list of generic sobjects as a parameter. What should the developer do to determine which object type (Account, Lead, Contact , for example ) to cast each sObject ?
Use the getSObjectType method on each generic sOBbect to retrieve the sObject token
16. 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’; }
B
17. When 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?
For (variable : list_or_set){…}
18. Which code segment can be used to control when the dowork() method is called?
If(trigger.IsInsert){dowork();}
19. A developer is creating test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?
@TestSetup
20. What are three characteristics of static methods? (Choose 2 answers)
Initialized only when a class is loaded
Allowed only in outer classes
21. A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom VF page. Which action can the developer perform to get the record types and picklist values in the controller?(Choose 2 answers)
Use Schema.PicklistEntry returned by Case Status getDescribe().getPicklistValues()
Use Schema.RecordTypeInfo returned by Case.SObjectType.getDescribe().getRecordTypeInfos()
22. Which type of information is provided by the Checkpoints tab in the Developer Console? (Choose 2 answers)
Exception
Namespace
23. What is a valid source and destination pair that can send or receive change sets? (Choose 2 answers)
Sandbox to Production
Sandbox to Sandbox
24. What should a developer working in a sandbox use to exercise a new test class before the developer class to production? (Choose 2 answers)
The Apex Test Execution page in Salesforce setup.
The Test menu in the Developer console.
25. What is true of a partial sandbox that is not true of a full sandbox?
Only includes necessary metadata
26. Which three tools can deploy metadata to productions? (Choose 3 answers)
Change set from sandbox
Force.com IDE
Metadata API
27. Before putting an app into production, which step should be taken?
Run the production check feature via the web interface
28. What are two testing considerations when deploying code from a sandbox to production? (Choose 2 answers)
100% of tests must execute without failure.
Apex Code requires 75% coverage.
29. Which user can edit a record after it has been locked for approval? (Choose 2 answers)
An administrator
A user who is assigned as the current approver.
30. In which two org types can a developer create new Apex classes? (Choose 2 answers)
Developer Edition
Sandbox
31. What are two ways a developer should deploy code from a developer org to an unrelated production org? (Choose 2 answers)
Package the code as an unmanaged package and install it in the production org.
Use an IDE to upload the new code directly into the production org using the metadata API
Correct answer
32. A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines. What data model should be used to track the data and to prevent orphan records?
Create a junction object to relate many engines to many parts through a master-detail relationship.
33. Which data structure is returned to a developer when performing a SOSL search?
A list of lists of sObjects.
34. How would a developer use Schema Builder to delete a custom to delete a custom field from the Account object that was required for prototyping but is no longer needed?
Remove all references from the code and then delete the custom field from Schema Builder.
35. Using the schema builder, a developer tries to change the API name of a field that is referenced inan Apex Test Class. What is the end results?
The API name is not changed and there are no other impacts.
36. What is the output of the following code ?Integer index = 1;Integer counter = 2;do { System.debug(index); index++; counter++; } while (index ==20 "counter == 21);
The debug statement will output 1
37. A developer writes the following code :List<Account> acc = { SELECT Id FROM Account LIMIT 10 };Delete acc;System.Debug(Limits.getDMLStatements() + ' , '+ Limits.getLimitDMLstatements() };What is the result of this debug statement ?
1150
38. Given the code block:Integer x;for (x = 0; x<10; x+=2)( if(x==8) break; if(x==10) break;)system,debug(x);Which value will the system, debug statement display?
8
39. What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose 2 answers)
for (Integer i=0; i<AccountList. Size();i++){…}
for (Account theAccount : AccountList){…}
40. A developer has the controller class below:Public with sharing class myFooController {Public integer prop { get; private set;}}Which code block will run successfully in an execute anonymous window?
myFooController m = new myFooControler ();\ System.asseert(m.prop=!null);
41. A visualforce interface is created for Case Management that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The visualforce page shouldinclude which <apex:page> attribute(s) to correctly implement controller functionality?
standardController = “case” and extensions =” myControllerExtension”
42. When are code coverage calculations updated?
When unit tests are run on an organization.
43. What is the printed from the following code? Integer a = 0; Integer b; a = a++; a++; Integer c = a*5; String s = String.value(c) + a; System.debug(s + ‘;’ + a +’;’ + b);
51;1;null
44. A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the <apex:SelectList> component, with a variable called “selection”, to show the valid values for Account.Type. The page uses an <apex:pageBlockTable> component to display the list of accounts, where the iteration variable is “acct”. The developer wants to ensure that when a user selects a type on the <apex:selectList> component, only accounts with that type are shown on the page. What should the developer do to accomplish this? (Choose 2 answer)
Add the Rendered = (!Acct.type==selection) attribute to the pageBlockTable component.
Use the onChange event to update the list of accounts in the controller when the value changes, and then re-render the pageBlockTable.
45. A developer uses a before insert trigger on the 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 bloack: 01 for(Lead l: Trigger.new){ 02 If (l.PostalCode != null){ 03 List<Territory__c> terrlist = [Select Id from Territory__c where PostalCode__c = :l.PostakCode]; 04 if(terrList.size() > 0){ 05 l.Territory__c = terrList[0].Id; } } } Which line of code is causing the block to fail?
03: A SOQL query is located inside the for loop.
46. A developer in Salesforce org with 100 Accounts executes the following code using the Developer console:Account myAccount = new Account(Name=’MyAccount’);Insert myAccount;For(Integer x=0; x<150;x++){ Account newAccount = new Account(Name=’MyAccount’+x); try{ insert newAccount;}catch(Exception ex){System.debug(ex);}}Insert new Account(Name=’MyAccount’);How many accounts are in the org after this code is run?
100
47. A 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(Parentd = parent.Id, Subject = parent.Subject); childCases.add(child);}insert childCases;What happens after the code block executes?
The trigger enters an infinite loop and eventually fails.
48. A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString = 'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}.What does the user see when accessing the custom page?
getMyString , , Method2, getMyString
49. Given the code block: Integer x; for (x = 0; x<10; x+=2) { if (x==8) break; if (x==10) break; } System.debug(x); Which value will the system.debug statement display?
8
50. What is the capability of Force.com IDE? (Choose 2 answers)
Run Apex tests
Edit metadata components.
51. What is an accurate constructor for a custom controller named “MyController”?
public MyController(){account = new Account();}
52. Which statement about the lookup relationship between a Custom Object and a Standard Object is correct?
The Lookup Relationship on the Custom Object can prevent the deletion of the standard object.
53. A 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?
Public ExtendedController(ApexPages.StandardController cntrl) { }
54. Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV’s package namespace.
Declare the class and method using the global access modifier.
55. A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable’s state between trigger executions. How should the developer declare maxAttempts to meet these requirements?
Declare maxAttempts as a constant using the static and final keywords.
56. A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?
The test method relies on existing data in the sandbox.
57. A developer has an apex controller for a Visualforce page that takes an ID as URl parameter.How should the developer prevent a cross site scripting vulnerability?
Apexpages.current pages() .getParameter().get(‘url_param’).escapeHtml4()
58. A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains the following options: ‘Vegan’, ‘Kosher’, ‘No Preference’. The developer must ensure a value is populated every time a record is created or updated.What is the most efficient way to ensure a value is selected every time a record is saved?
Mark the field as Required on the field definition.
59. A developer must provide a custom user interface when users edit a Contact. Users must be able to use the interface in Salesforce Classic and Lightning Experience. What should the developer do to provide the custom user interface?
Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience.
60. A developer is debugging the following code to determine why Accounts are not being created.Account a = new Account(Name='A');Database.insert(a, false);How should the code be altered to help debug the issue?
Collect the insert method return value in a SaveResult record.
docs.google.com/forms/u/0/d/e/1FAIpQLSf-5OqJ-0p6K2fKod6Wjfjsf1c9prTgSv96tFjXbx_y-RJJNw/formResponse
'Salesforce' 카테고리의 다른 글
| 세일즈포스 Platform Developer Dump 2021-1 (0) | 2021.06.19 |
|---|---|
| 세일즈포스 자격증 할인 쿠폰 2021 (0) | 2021.05.17 |
| Salesforce Meet Flow Builder (0) | 2021.04.27 |
| Salesforce Marketing Cloud Email Specialist Certification Maintenance (Spring '21) (0) | 2021.04.25 |
| Salesforce Administrator Certification Maintenance (Spring ’21) (0) | 2021.04.23 |