티스토리 뷰

1.      Which aspect of Apex programming is limited due to multitenancy?

-        A. The number of records returned from database queries

-        B. The number of active Apex classes

-        C. The number of methods in an Apex Class

-        D. The number of records processed in a loop

 

 

2.      How many accounts will be inserted by the following block of code? for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; } 0 Boolean odk;

-        A. X=10

-        B. X=4

-        C. X=8

-        D. X=9

 

 

3.      How many accounts will be inserted by the following block ofcode?
for(Integer i = 0 ; i < 500; i++) {
 Account a = new Account(Name='New Account ' + i); insert a; }
Boolean odk;
Integer x;
if(abok=false;integer=x;){ X=1; }
elseif(abok=true;integer=x;){ X=2;}
elseif(abok!=null;integer=x;){X=3;}
elseif{X=4;}

-        A. X=10

-        B. X=4

-        C. X=8

-        D. X=9

-        + The default value is null - same for all primitives.

 

 

4.      A developer created a Visualforce page and custom controller to display the account type field as shown below.
Custom controller code:
public class customCtrlr{
 private Account theAccount;
 public String actType;
 public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id = :apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } }
Visualforce page snippet: The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?

-        A. Add a getter method for the actType attribute.

-        B. Change theAccount attribute to public.

-        C. Convert theAccount.Type to a String.

-        D. Add with sharing to the custom controller.

 

 

5.      Universal Containers (UC) decided it will not to send emails to support personnel directly from Salesforce in the event that an unhandled exception occurs. Instead, UC wants an external system be notified of the error. What is the appropriate publish/subscribe logic to meet these requirements?

-        A. Publish the error event using the Eventbus.publish() method and have the external system subscribe to the event using CometD.

-        B. Publish the error event using the addError() method and have the external system subscribe to the event using CometD.

-        C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.

-        D. Publish the error event using the addError() method and write a trigger to subscribe to the event and notify the external system.

 

 

6.      A Licensed_Professional__c custom object exist in the system with two Master-Detail fields for the following objects: Certification__c and Contact. Users with the "Certification Representative" role can access the Certification records they own and view the related Licensed Professionals records, however users with the "Salesforce representative" role report they cannot view any Licensed professional records even though they own the associated Contact record. What are two likely causes of users in the "Sales Representative" role not being able to access the Licensed Professional records? (Choose 2 answers) (check)

-        A. The organization's sharing rules for Licensed_Professional__c have not finished their recalculation process.

-        B. The organization has a private sharing model for Certification__c, and Certification__c is the primary relationship in the Licensed_Professional__c object.

-        C. The organization has a private sharing model for Certification__c, and Contact is the primary relationship in the Licensed_Professional__c object

-        D. The organization recently modified the Sales representative role to restrict Read/Write access to Licensed_Professional__c

 

 

7.      Which exception type cannot be caught?

-        A. NoAccessException

-        B. CalloutException

-        C. Custom Exception

-        D. LimitException

-        https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_exception_methods.htm

 

 

8.      A custom object Trainer_c has a lookup field to another custom object Gym___c. Which SOQL query will get the record for the Viridian City gym and it's trainers?

-        A. SELECT ID FROM Trainer_c WHERE Gym__r.Name - Viridian City Gym'

-        B. SELECT Id, (SELECT Id FROM Trainers__r) FROM Gym_C WHERE Name = ‘Viridian City Gym'

-        C. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name - Viridian City Gym'

-        D. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym_c WHERE Name - Viridian City Gym'

 

 

9.      A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection attack? (Choose 2 answers)

-        A. Use the @Readonly annotation and the with sharing keyword on the class.

-        B. Use variable binding and replace the dynamic query with a static SOQL.

-        C. Use the escapeSingleQuote method to sanitize the parameter before its use.

-        D. Use a regular expression on the parameter to remove special characters.

 

 

10.    Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

-        A. Limits

-        B. Exception

-        C. OrgLimits

-        D. Messaging

 

 

11.    What is the maximum number of SOQL queries used by the following code?
List<Account> aList = [SELECT Id FROM Account LIMIT 5];
for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }

-        A. 6

-        B. 5

-        C. 1

-        D. 2

-        + 1st time -> [SELECT Id FROM Account LIMIT 5];

-        + 5 times -> into for loop query will be for 5 times because the size of List is 5.

-        + maximum number of “SOQL queries used by”

 

 

12.    A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?

-        A. Use Test.Loaddata () and reference a static resource.

-        B. Use SOQL to query the org for the required data.

-        C. Use Anonymous Apex to create the required data.

-        D. Use Test.Loaddata () and reference a CSV file

 

 

13.    Which three resources in an Aura Component can contain Javascript functions? (Choose 3 answers)

-        A. Controllers

-        B. helper

-        C. Design

-        D. Style

-        E. Renderer

 

 

14.    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? (Similar)

-        A. Renderer.js

-        B. Handler.js

-        C. Controller.js

-        D. Helper.js

 

 

15.    A developer has javascript code that needs to be called by controller functions in multiple components by extending a new abstract component. Which resource in the abstract component bundle allows the developer to achieve this? (Similar)

-        A. Helper.js

-        B. Rendered.js

-        C. Superrender.js

-        D. Controller.js

-        + Helper 서버측 컨트롤러이다. 일반적으로 서버 작업을 실행하고 데이터 또는 task 처리하는데 사용된다. 클라이언트 컨트롤러나 Renderer에서 Helper 자바스크립트 함수를 호출할 있다.

-        + Helper 모든 항목에서 공유되므로 컨트롤러와 Renderer 간의 논리를 곳에서 공유하고 유지할 있다. 또한 컨트롤러 Renderer 내에서 논리를 유지하는데 도움이 된다. 다른 컨트롤러 메소드에서 하나의 컨트롤러 메소드를 호출해야 되는 경우 언제든지 해당 로직을 Helper 이동해야 한다.

 

 

16.    A workflow updates the value of a custom field for an existing Account. How can a developer access the updated custom field value from a trigger?

-        A. By writing an After Update trigger and accessing the field value from Trigger.old

-        B. By writing an After Insert trigger and accessing the field value from Trigger.old

-        C. By writing, a Before Update trigger and accessing the field value from Trigger.new

-        D. By writing a Before Insert trigger and accessing the field value from Trigger.new

 

 

17.    What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

-        A. Querying Accounts. Query Exception. Done

-        B. Querying Accounts. Custom Exception.

-        C. Querying Accounts. Query Exception

-        D. Querying Accounts. Custom Exception Done

 

 

18.    How many accounts will be inserted by the following block of code?
for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }

-        A. 100

-        B. 0

-        C. 500

-        D. 150

 

 

19.    A custom Visualforce controller calls the ApexPages, addMessage () method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message? (check)

-        A. <apex: pageMessage severity="info''/>

-        B. <apex: pageMessages />

-        C. <Apex: message for='' info''/>

-        D. <Apex: facet name='' message''/>

 

 

20.    A developer has a requirement to create an Order When an Opportunity reaches a "Closed-Won" status. Which tool should be used to implement this requirement? (check)

-        A. Process Builder

-        B. Lightning Component

-        C. Lightning

-        D. Apex trigger

 

 

21.    What action causes a before trigger to fire by default for accounts?

-        A. Converting leads to contacts

-        B. Importing data using the data loader and the Bulk API

-        C. Updating address using the Mass Address update tool

-        D. Renaming or replacing picklists

-        + https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_ignoring_operations.htm

 

 

22.    A developer needs an Apex method that can process Account or Contact records. Which method signature should the developer use?

-        A. Public void doWork(sObject theRecord)

-        B. Public void doWork(Account Contact)

-        C. Public void doWork(Record theRecord)

-        D. Public void doWork(Account || Contatc)

 

 

23.    Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?

-        A. Event Monitoring Log

-        B. Developer Log

-        C. Calendar Events

-        D. Asynchronous Data Capture Events

 

 

24.    The following Apex method is part of the ContactService class that is called from a trigger: public static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = "EMEA" ; update thisContact; } How should the developer modify the code to ensure best practice are met? (check)

-        A. Public static void setBusinessUnitToEMEA(List<Contact> contacts){ for(Contact thisContact : contacts) { thisContact.Business_Unit__c = 'EMEA' ; } update contacts; }

-        B. Public void setBusinessUnitToEMEA(List<Contact> contatcs){ contacts[0].Business_Unit__c = 'EMEA' ; update contacts[0]; }

-        C. Public static void setBusinessUnitToEMEA(Contact thisContact){ List<Contact> contacts = new List<Contact>(); contacts.add(thisContact.Business_Unit__c = 'EMEA'); update contacts; }

-        D. Public static void setBusinessUnitToEMEA(List<Contact> contacts){ for(Contact thisContact : contacts){ thisContact.Business_Unit__c = 'EMEA' ; update contacts[0]; } }

 

 

25.    Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

-        A. <aura:application access=”GLOBAL” extends=”ltng:outApp:>
   <aura:dependency resource=”c:accountlist” />
 </ aura:application >

 

 

26.    A developer identifies the following triggers on the Expense_c object:
* DeleteExpense,
* applyDefaultstoexpense
* validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively. Which two techniques should the developer implement to ensure trigger best practice are followed?

-        A. Unify the before insert and before update triggers and use Process Builder for the delete action.

-        B. Unify all three triggers in a single trigger on the Expense__c object that includes all events.

-        C. Create helper classes to execute the appropriate logic when a record is saved.

-        D. Maintain all three triggers on the Expense__c object, but move the Apex logic out for the trigger definition.

 

 

27.    Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow :
* Name
* Amount
* Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers) (check)

-        A. Create an after update trigger on the Opportunity object that calls a helper method using

-        @Future(Callout=true) to perform the HTTP REST callout.

-        B. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

-        C. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.

-        D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

 

 

28.    developer created this Apex trigger that calls MyClass .myStaticMethod: trigger myTrigger on Contact(before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap); } The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exist? (check)

-        A. The deployment fails because no assertions were made in the test method.

-        B. The deployment passes because both classes and the trigger were included in the deployment.

-        C. The deployment fails because the Apex trigger has no code coverage.

-        D. The deployment passes because the Apex code has required (>75%) code coverage.

 

 

29.    A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles. Which two tools can they use to run a script that deploys to a sandbox? (Choose 2 answers)

-        A. SFDX CLI

-        B. Developer Console

-        C. Change Sets

-        D. Ant Migration Tool

-        + Ant Migration Tool 로컬 디렉토리와 Org간의 메타 데이터를 이동하기 위한 도구이다.

-        + https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/meta_development.htm

 

 

30.    The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology' while also retrieving the contact's Job_Application__c records. Based on the object's relationships, what is the most efficient statement to retrieve the list of contacts? (check)

-        A. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry = 'Technology'];

-        B. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry = 'Technology'];

-        C. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE Accounts.Industry = 'Technology'];

-        D. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry = 'Technology'];

-        + 상위에서 쿼리할 하위 Object 이름을 복수형으로 바꿔 사용해야 한다.

-        +https://salesforce.stackexchange.com/questions/145228/sub-querying-objects-plural-relationship-name

 

 

31.    What is the requirement for a class to be used as a custom Visualforce controller? (check)

-        A. Any top-level Apex class that extends a PageReference.

-        B. Any top-level Apex class that has a constructor that returns a PageReference.

-        C. Any top-level Apex class that has a default, no-argument constructor.

-        D. Any top-level Apex class that implements the controller interface.

-        + chatGPT 따르면, class public이나 global 정의되어야 하며, 최소 pulbic이나 global 정의된 메소드가 하나 이상이어야 하며, 메소드는 void 타입이거나 PageReference 인스턴스를 반환해야 하며, 매개변수가 없는 constructor 있어야 한다.

 

 

32.    Which two statements are accurate regarding Apex classes and interfaces? (Choose 2 answers)

-        A. Interface methods are public by default.

-        B. A top-level class can only have one inner class level.

-        C. Inner classes are public by default.

-        D. Classes are final by default.

-        https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_final.htm

-        + Interface methods are global by default.

 

 

33.    A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?

-        A. @InvocableMethod global List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /*implementation*/ }

-        B. @InvocableMethod global static List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /*implementation*/ }

-        C. @InvocableMethod global Recommendation getLevel (ContactWrapper input) { /*implementation*/ }

-        D. @InvocableMethod global static ListRecommendation getLevel(List<ContactWrapper> input) { /*implementation*/ }

 

 

34.    A developer uses a loop to check each Contact in a list. When a Contact with the Title of "Boss" is found, the Apex method should jump to the first line of code outside of the for loop. Which Apex solution will let the developer implement this requirement?

-        A. Exit

-        B. break;

-        C. Continue

-        D. Next

 

 

35.    A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability? (check)

-        A. String.ValueOf(ApexPages.currentPage() .getParameters() .get('url_param'))

-        B. String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get('url_param'))

-        C. ApexPages.currentPage() .getParameters() .get('url_param')

-        D. ApexPages.currentPage() .getParameters() .get('url_param') .escapeHtml4()

-        + Cross-site scripting(XSS) 다른 사용자가 페이지에 악성 코드를 삽입하는 공격이다.

-        +이를 방지하는 방법 하나는 사용자 입력 값에 있는 특수 문자를 이스케이프(escape)하는 것이다.

-        + XSS 방지하기 위해서는 escapeSingleQuotes() 메소드를 사용하여 입력 값의 작은따옴표를 이스케이프해야 한다. 메소드는 작은따옴표를 문자 엔티티(&#39;) 대체합니다.

 

 

36.    What are three characteristics of change set deployments? (Choose 3 answers) (check)

-        A. Change sets can only be used between related organizations.

-        B. Sending a change set between two orgs requires a deployment connection.

-        C. Deployment is done in a one-way, single transaction.

-        D. Change sets can be used to transfer records.

-        E. Change sets can deploy custom settings data.

-        + Change sets contain information about the org. They don’t contain data, such as records

-        + https://help.salesforce.com/s/articleView?language=en_US&id=sf.changesets.htm&type=5 

 

 

37.    Which three resources in an Azure Component can contain JavaScript functions?

-        A. Style

-        B. helper

-        C. Renderer

-        D. Controllers

-        E. Design

-        + https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_intro.htm

 

 

38.    Which process automation should be used to send an outbound message without using Apex code? (check)

-        A. Flow Builder

-        B. Workflow Rule

-        C. Approval Process

-        D. Process Builder

 

 

39.    Which scenario is valid for execution by unit tests?

-        A. Load data from a remote site with a callout

-        B. Set the created date of a record using a system method.

-        C. Execute anonymous Apex as a different user.

-        D. Generate a Visualforce PDF with geccontentAsPDF ().

 

 

40.    Which scenario is invalid for execution by unit tests?

-        A. Executing methods for negative test scenarios.

-        B. Loading test data in place of user input for Flows.

-        C. Executing methods as different users.

-        D. Loading the standard Pricebook ID using a system method.

-        + https://brainly.com/question/14808944

-        + unit test 코드의 특정 부분과 해당 기능을 검사하기 위한 기능인데, Flow 경우에는 전체 코드가 실행되어버리기에 적절하지 않다.

 

 

41.    A developer wants to mark each Account in a List<Account> as either or Inactive based on the LastModified field value being more than 90 days. Which Apex technique should the developer use?

-        A. A for loop, with a switch statement inside

-        B. A Switch statement, with a for loop inside

-        C. An If/else statement, with a for loop inside

-        D. A for loop, with an if/else statement inside

 

 

42.    Cloud kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls. At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen. What should a developer use to satisfy this requirement?

-        A. An Apex Controller

-        B. An Apex REST Class

-        C. An Outbound message

-        D. An invocable method

 

 

43.    Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application may apply for more than one job. What should a developer implement to represent that an applicant has applied for a job?

-        A. Master-detail field from Applicant to Job

-        B. Formula field on Applicant that references Job

-        C. Junction object between Applicant and Job

-        D. Lookup field from Applicant to Job

 

 

44.    Universal Containers would like applicants to apply for multiple positions, tracking how many applicants have applied and how many positions each individual applicant has applied for. To do this, the administrator will create a Job Application junction object between the Applicant and Position objects. How does this action meet the requirement? (Similar)

-        A. A lookup relationship on the Applicant object with Position as the master provides roll-up summary fields without code

-        B. The junction object allows the administrator to add a workflow rule to update fields on the Position and Applicant objects

-        C. The junction object allows a many-to-many relationship and also roll-up summary fields on the parent objects

-        D. The Job Application object as a master to Position and Applicant objects will allow roll-up summary fields on the Position and Applicant objects

 

 

45.    A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per 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? (Similar)

-        A. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.

-        B. Create a master-detail relationship in the Application custom object to the Job Postings custom object.

-        C. Create a lookup relationship on both objects to a junction object called Job Posting Applications.

-        D. Create a lookup relationship in the Applications custom object to the Job Postings custom object.

-        + https://developer.salesforce.com/forums/?id=906F0000000g1uiIAA

 

 

46.    A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit.

public class without sharing OpportunityService {

 

   public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds) {

      List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>();

      for(Id thisOppId : opportunityIds) {

         oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)];

      }

      return oppLineItems;

   }

 

}

The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

-        A. Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.

-        B. Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.

-        C. Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.

-        D. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunity Ids.

 

 

47.    Universal Containers (UC) processes orders in Salesforce in a custom object, Crder_c. They also allow sales reps to upload CSV files with of orders at a time. A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system. ‘After the status for an Craer___c is first set to "Placed’, the order information must be sent to a REST endpoint in the ERP system that can process ne order at a time. What should the developer implement to accomplish this?

-        A. Callout from an @future method called from a trigger

-        B. Callout from a Scheduled class called from a scheduled job

-        C. Flow with 2 callout from an invocable method

-        D. Callout from a queseatie class called from a trigger

 

 

48.    A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute complex validation involving several types of objects. When creating the Apex method, which annotation should a developer use to ensure the method Can be used within the flow?

-        A. @future

-        B. @RemoteAction

-        C. @InvocableMethod

-        D. @AuraEnable

 

 

49.    If apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which statement are true regarding governor limits? (Choose 2 answers)

-        A. The Apex governor limits might be higher due to the asynchronous nature of the transaction.

-        B. The apex governor limits are reset for each iteration of the execute() method.

-        C. The Apex governor limits are relaxed while calling the constructor of the Apex class.

-        D. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.

 

 

50.    Which action can a developer perform in a before update trigger? (Choose 2)

-        A. Delete the original object using a delete DML operation.

-        B. Display a custom error message in the application interface.

-        C. Change field values using the Trigger.new context variable.

-        D. Update the original object using an update DML operation.

-        + It’s going to store the set record before update to database.

-        + In Before Update we can change fields using trigger.new.

-        + Updating of original object using an update DML operation is not allowed. A runtime error is thrown.

-        + Deleting of original object using a delete DML operation is also not allowed. Runtime error will be thrown.

 

 

51.    An Account trigger updates all related Contacts and Cases each time an Account is saved using the following two DML statements:
update allContacts;
update allCases;
What is the result if the Case update exceeds the governor limit for maximum number of DML records?

-        A. The Account save fails and no Contacts or Cases are updated.

-        B. The Account save succeeds, Contacts are updated, but Cases are not.

-        C. The Account save is retried using a smaller trigger batch size.

-        D. The Account save succeeds and no Contacts or Cases are updated

 

 

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

-        A. Create a required comments field.

-        B. Create a required Visualforce component.

-        C. Create a validation rule.

-        D. Create a formula field.

 

 

53.    A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the <apex:SelecList> 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? (check)

-        A. Create a component for each option and use a variable with hide parameter on the element.

-        B. Create multiple lists in the controller that represent the relevant accounts for each account type when the page loads, then reference the correct one dynamically on the pageBlockTable.

-        C. Use the onChange event to update the list of accounts in the controller when the value changes, and then re-render the pageBlockTable.

-        D. Add the Rendered={!Acct.type==selection} attribute to the pageBlockTable component.

-        + apex:selectList component에서 유형을 선택할 선택한 유형에 해당하는 계정만 페이지에 표시하려면, onChange 이벤트를 사용하여 값이 변경될 컨트롤러에서 계정 목록을 업데이트하고 apex:pageBlockTable 구성 요소를 다시 렌더링해야 한다.

-        + A option마다 component 만들어야 하기에 코드의 복잡성이 높아지고,

-        + B 경우에는 visualforce 페이지가 로드될 때마다 유형에 해당하는 목록을 컨트롤러에서 미리 쿼리해서 보여주는 방법이기에 선택 가능한 계정 유형이 추가되거나 변경될 때마다 코드를 업데이트해야 하는 문제가 있다. 또한 선택 가능한 계정 유형이 많아지면 쿼리가 복잡해질 가능성이 높고, 이로 인해 페이지 로딩 속도가 느려질 있다.

-        + C 경우에는 컨트롤러를 사용하여 선택된 옵션에 해당하는 계정 목록을 쿼리하고, 이를 페이지에 다시 렌더링하는 방법이다. 방법은 선택 가능한 옵션이 변경되더라도 코드를 수정할 필요가 없으며, 선택된 옵션에 해당하는 계정 목록만 페이지에 표시되므로 불필요한 쿼리를 하지 않아도 된다.

-        + D 경우에는 페이지에 표시할 계정 목록을 선택한 옵션에 따라 동적으로 변경하는 것이 아니라, 미리 지정된 조건에 따라 계정 목록을 필터링하여 보여주는 방법이다. 이를 위해 Apex에서는 Rendered 속성을 사용하여 조건식을 지정하고, 조건식이 참이면 해당 컴포넌트를 표시하고, 거짓이면 표시하지 않도록 해야 한다.

-        + 그러나 방법은 사용자가 선택한 옵션에 따라 컨트롤러에서 계정 목록을 업데이트하지 않으므로, 선택된 옵션에 해당하는 계정 목록만 표시할 없다. 또한 방법은 사용자가 선택 가능한 옵션을 변경할 때마다 코드를 수정해야 하므로, 유지보수가 어려울 있다.

 

 

54.    When is an Apex Trigger required instead of a Process Builder Process?

-        A. When a post to Chatter needs to be created

-        B. When a record needs to be created

-        C. When multiple records related to the triggering record need to be updated

-        D. When an action needs to be taken on a delete or undelete, or before a DML operation is executed.

-        + 트리거는 이벤트 전에 처리할 있으며 프로세스 빌더의 경우에는 그렇지 않다. 프로세스 빌더는 레코드가 생성되거나 업데이트된 후에 실행된다.

-        + 프로세스 빌더에서는 레코드가 생성되거나 업데이트된 후에 작업이 수행되기 때문에 많은 DML 소비하게 된다.

-        + 트리거는 DELETE 비즈니스 로직을 실행할 있다. (프로세스 빌더는 불가능)

-        + 트리거가 있는 레코드는 삭제할 있지만 프로세스 빌더는 삭제할 없습니다.

 

 

55.    The account object has a custom percent field, rating, defined with a length of 2 with 0 decimal places. An account record has the value of 50% in its rating field and is processed in the apex code below after being retrieved from the database with SOQL public void processaccount(){ decimal acctscore = acc.rating__c  * 100; } what is the value of acctscore after this code executes? (check)

-        A. 500

-        B. 5

-        C. 50

-        D. 5000

-        + percent field에서는 % 제외한 수치를 number 형태로 전환하여 저장한다. , 50% % 제외한 50으로 저장되기에 50 * 100 5000 정답이다.

-        + https://salesforce.stackexchange.com/questions/50103/percentage-field-semantics-1-or-100-for-100

 

 

56.    A developer has to identify a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a SOQL statement to save the changes to the database. Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits? (Choose 2 answers)

-        A. Use the Database.Savepoint method to enforce database Integrity.

-        B. Use the System.Limit class to monitor the current CPU governor limit consumption.

-        C. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.

-        D. Use Partial DHL statements to ensure only valid data is committed.

 

 

57.    How should a developer create a new custom exception class?

-        A. public class CustomException extends Exception{}

-        B. public class CustomException implements Exception{}

-        C. CustomException ex = new (CustomException)Exception();

-        D. (Exception)CustomException ex = new Exception();

 

 

58.    When would the use of Heroku Postgres be appropriate?

-        A. To store user generated pictures and Word documents.

-        B. To store and retrieve data using the Structured Query Language.

-        C. To interconnect Microsoft SQL servers to Heroku Applications.

-        D. To cache commonly accessed data for faster retrieval.

-        + https://devcenter.heroku.com/articles/heroku-postgresql

 

 

59.    What is the proper process for an Apex Unit Test?

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

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

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

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

 

 

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

-        A. On the monitored user's name.

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

-        C. The Log Filters tab on a class or trigger detail page.

-        D. The Show More link on the debug log's record.

 

 

61.    How can a developer set up a debug log on a specific user? (Similar)

-        A. It is not possible to setup debug logs for users other than yourself.

-        B. Create Apex code that logs code actions into a custom object.

-        C. Ask the user for access to their account credentials, log in as the user and debug the issue.

-        D. Set up a trace flag for the user, and define a logging level and time period for the trace.

 

 

62.    A developer runs the following anonymous code block in a Salesforce org with 100 accounts List acc= {select id from account limit 10}; delete acc; database.emptyrecyclebin(acc); system.debug(limits.getlimitqueries()+' ,'+Limits.getlimitDMLStatements()); What is the debug output?

-        A. 150, 100

-        B. 10, 2

-        C. 100, 150

-        D. 1, 2

-        + getLimitQueries() -> Returns the total number of SOQL queries that can be issued.

-        + https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_limits.htm

-        + https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_emptyrecyclebin.htm

 

 

63.    A developer writes the following code: What is the result of the debug statement? (Similar)

-        A. 2, 200

-        B. 1, 100

-        C. 2, 150

-        D. 1, 150

-        + getDMLStatements() 호출된 DML (: 삽입, 업데이트 또는 database.EmptyRecycleBin 메서드) 수를 반환.

-        +https://salesforce.stackexchange.com/questions/100867/limits-getdmlstatements-limits-getlimitdmlstatements

 

 

64.    Which code segment can be used to control when the dowork() method is called?

-        A. For (Trigger.isRunning t: Trigger.new) { dowork(); }

-        B. If ( Trigger.isInsert ) dowork();

-        C. If(Trigger.isRunning) dowork();

-        D. For (Trigger.isInsert t: Trigger.new) {dowork(); }

-        + dowork 레코드가 데이터베이스에 커밋되면 추가 작업을 수행할 있는 기능을 제공한다.

-        + https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/tpm_promotion.do.work.htm

 

 

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

-        A. After Trigger execution.

-        B. Before Trigger execution.

-        C. After Committing to database.

-        D. Before Committing to database.

 

 

66.    An 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 Position_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?

-        A. By using an Apex trigger with a DML operation.

-        B. By changing Application_c.Status_c into a formula field.

-        C. By configuring a cross-object field update with a workflow.

-        D. By changing Application_c.Status_c into a roll -up summary field.

-        + https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7zgGSAR

-        + 상위 레코드가 업데이트될 하위 레코드의 필드를 업데이트하려면 트리거를 사용해야 한다.

-        + D 경우, look-up field roll-up summary field 사용 없기에 불가능하다.

-        + B 경우, picklist이기에 formula filed 변경이 불가능 하다.

-        + c 경우, look-up 관계이기에 관련일 업데이트가 가능하다.

 

 

67.    How can a developer use a Set<Id> to limit the number of records returned by a SOQL query?

-        A. Reference the Set in the WHERE clause of the query

-        B. Reference the Set in the LIMIT clause of the query

-        C. Pass the Set as an argument in a reference to the Database.query() method

-        D. Pass the query results as an argument in a reference to the Set.containsAll() method.

-        + LIMIT 수를 제한할 수는 있지만, 이는 LIMIT으로 제한한 것이지 Set<Id> 통해 제한한 것이 아니기에 WHERE절에 SELECT Id, Name FROM Account WHERE Id IN :accountIds 같이 set 들어간 Id 추출할 있도록 해야 한다.

 

 

68.    What are two considerations for deciding to use a roll-up summary field? (Choose 2 answers)

-        A. Roll-up cannot be performed on formula fields.

-        B. Roll-up cannot be performed on formula fields that use cross-object references or on-the-fly calculations such as NOW().

-        C. Roll-up summary can be performed on formula fields, but if their formula contains an #Error result, it may affect the summary value.

-        D. Roll-up summary fields do not cause validation rules on the parent object unless that object is edited separately.

-        + https://developer.salesforce.com/forums/?id=9060G0000005kgJQAQ

 

 

69.    When are code coverage calculations updated?

-        A. When unit tests are run on an organization.

-        B. When Apex code is saved.

-        C. When a deployment is validated.

-        D. Roll-up cannot be performed on formula fields that use cross-objectreferences or on-the-fly calculations such as NOW().

 

 

70.    A developer 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 record?

-        A. Create a Workflow rule to relate the Task to the Contact's Account.

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

-        C. Create an Account formula field that displays the Task information.

-        D. Nothing. The task is automatically displayed on the Account page.

-        + https://developer.salesforce.com/forums/?id=9062I000000g8ASQAY

 

 

71.    Given the code below: 

What should a developer do to correct the code so that there is no chance of hitting a governor limit?

-        A. Rework the code and eliminate the for loop.

-        B. combine the two SELECT statements into a single SOQL statement.

-        C. Add a WHERE clause to the first SELECT SOQL statement.

-        D. Add a LIMIT clause to the first SELECT SOQL statement.

 

 

72.    Which three steps allow a custom SVG to be included in a Lightning web component? (Choose 3 answers)

-        A. Reference the import in the HTML template.

-        B. Import the SVG as a content asset file.

-        C. Import the static resource and provide a better for it in JavaScript.

-        D. Upload the SVG as a static resource.

-        E. Reference the getter in the HTML template.

-        +https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_svg_in_component

 

 

73.    A sales manager wants to make sure that whenever an opportunity stage is changed to 'Closed Won', a new case will be of created for the support team to collect necessary information from the customer. How should a developer accomplish this?

-        A. Create a workflow rule to create the new case.

-        B. Create a lookup field to the Case object on the opportunity object.

-        C. Create a Process Builder to create the new case.

-        D. Set up a validation rule on the Opportunity Stage.

-        + D 경우 유효성 검사하고 일부 조건이 충족되지 않으면 사용자가 다음 단계로 진행하지 못하게 하는 것뿐이므로 자동으로 새로운 케이스 레코드를 생성하지 않는다.

-        + B 자동으로 새로운 케이스 레코드를 만들어주지 않으며, A 경우에는 업데이트만 가능하기에 process builder 적절하기에 C 정답이다.

 

 

74.   A platform developer needs to implement a declarative solution that will display the most recent closed won date for all opportunity records associated with an account. Which field is required to achieve this declaratively?

-        A. Roll-up summary field on the opportunity object

-        B. Cross-object formula field on the account object

-        C. Roll-up summary field on the account object

-        D. Cross-object formula field on the opportunity object

 

 

75.    An apex trigger fails because it exceeds governor limits. Which two techniques should a developer use to resolve the problem? (Choose 2 answers)

-        A. Use SOQL aggregate queries to retrieve child records.

-        B. Use the database class to handle DML operations.

-        C. Use maps to reference related records.

-        D. Use lists for all DML operations

 

 

76.    How can a developer avoid exceeding governor limits when using an Apex Trigger? (Choose 2 answers) (Similar)

-        A. By using Maps to hold data from query results.

-        B. By using a helper class that can be invoked from multiple triggers.

-        C. By performing DML transactions on lists of SObjects.

-        D. By using the Database class to handle DML transactions.

 

 

77.    When creating a record with a Quick Action, what is the easiest way to post a feed item?

-        A. By adding a trigger on the new record.

-        B. By selecting create case feed on the new record.

-        C. By selecting create feed item on the quick action.

-        D. By adding a workflow rule on the new record.

 

 

78.    A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided that the trigger should be tested with 200 account records with unique names. What two things should be done to create the test data within the unit test with the least amount of code? (Choose 2 answers)

-        A. Use the @isTest(isParallel=true) annotation in the test class.

-        B. Use the @isTest(seeAllData=true) annotation in the test class.

-        C. Use Test.loadData to populate data in your test methods.

-        D. Create a static resource containing test data.

-        + B is only to use existing data from the org

-        + https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_load_data.htm

 

 

79.    What is the result of the following code block ?
Integer x = 1;Integer Y = 0;While(x < 10){Y++;}

-        A. An error occurs

-        B. Y = 10

-        C. Y = 9

-        D. X = 0

 

 

80.    A developer is asked to create a Visualforce page that displays some Account fields as well as fields configured on the page layout for related Contacts. How should the developer implement this request?

-        A. Use the <apex:relatedList> tag.

-        B. Create a controller extension.

-        C. Add a method to the standard controller.

-        D. Use the <apex:include> tag.

-        + https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_templates_include.htm

-        + https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_relatedList.htm

 

 

81.    A developer uses a test setup method to create an account named 'test'. The first method deletes the account record. What must be done in the second test method to use the account? (check)

-        A. The account cannot be used in the second method

-        B. Use select id from account where name='test'

-        C. Call the test setup method at the start of the test

-        D. Restore the account using an undelete statement.

 

 

82.    Which statement is true about a hierarchical relationship as it pertains to user records?

-        A. It uses a junction object and lookup relationships to allow many user records to be related to many other user records.

-        B. It uses a master-detail relationship to allow one user record to be related to another user record.

-        C. It uses a special lookup relationship to allow one user record to be related to another user record.

-        D. It uses a junction object and master-detail relationship to allow many user records to be related to many other user records.

-        + https://help.salesforce.com/s/articleView?id=sf.overview_of_custom_object_relationships.htm&type=5

-        + This special lookup field called Hierarchical Relationship is available only on the user object.

-        + It lets users use a lookup field to associate one user with another that does not directly or indirectly refer to itself.

 

 

83.    A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?

-        A. controller="Case" and extensions="myControllerExtension"

-        B. extensions="myControllerExtension"

-        C. controller="myControllerExtension"

-        D. standardController="Case" and extensions="myControllerExtension"

 

 

84.    What are two valid options for iterating through each Account in the collection List <Account> named AccountList? (Choose 2 answers.)

-        A. For (Account theAccount : AccountList){...}

-        B. For (List L : AccountList) {...}

-        C. For(AccountList){...}

-        D. For (Integer i=0; i<AccountList. Size();i++){...}

 

 

85.    A developer wants multiple test classes to use the same set of test data. How should the developer create the test data? (check)

-        A. Create a test setup method for each test class

-        B. Reference a test utility class in each test class

-        C. Define a variable for test records in each test classes

-        D. Use the seealldata=true annotation in each test class

-        + https://trailhead.salesforce.com/ko/content/learn/modules/apex_testing/apex_testing_data

 

 

86.    What is a valid source and destination pair that can send or receive change sets? (Choose 2)

-        A. Sandbox to Sandbox

-        B. Developer Edition to Sandbox

-        C. Sandbox to Production

-        D. Developer Edition to Production

 

 

87.    A developer is debugging the following code to determinate 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?

-        A. Add a try/catch around the insert method

-        B. Add a System.debug() statement before the insert method

-        C. Set the second insert method parameter to TRUE

-        D. Collect the insert method return value a Saveresult record

 

 

88.    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 URLWhich statement is unnecessary inside the unit test for the custom controller?

-        A. String nextPage = controller.save().getUrl();

-        B. ApexPages.currentPage().getParameters().put('input', 'TestValue')

-        C. Test.setCurrentPage(pageRef)

-        D. Public ExtendedController (ApexPages.StandardController cntrl) { }

 

 

89.    Which two are best practices when it comes to component and application event handling? (Choose 2 answers)

-        A. Reuse the event logic in a component bundle, by putting the logic in the helper.

-        B. Handle low-level events in the event handler and re-fire them as higher-level events.

-        C. Try to use application events as opposed to component events

-        D. Use component events to communicate actions that should be handled at the application level

 

 

90.    Which two platform features allow for the use of unsupported languages? Choose 2 answers

-        A. Docker

-        B. Heroku Acm

-        C. App.json

-        D. Buildpacks

 

 

91.    A developer wants to store a description of a product that can be entered on separate lines by a user during product setup and later displayed on a 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 that are written?

-        A. Text Area

-        B. Text Area (Long)

-        C. Text Area (Rich)

-        D. Text

 

 

728x90
댓글
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
최근에 올라온 글
Total
Today
Yesterday
공지사항