PD1 Most Recent Quesons 1. A developer created a Lightning Component named accountList.cmp that displays a list of Accounts. Client side logic that is executed when a user hovers over an Account in the list should be stored in which bundle number? A. accoun accountLi tList stRen Render derer er.js .js B. acco accoun untL tLis ist. t.re rend nder erer er
C. accountListHelper.js Ans ! D. acco accoun untL tLis ist. t.he help lper er
". #hat is the return data type when Apex$ages.current$age!.get$arameters! is used to retrieve %&L parameters from a 'isualforce controller? A. String[] B. Lis ListStr Strin ing! g!
C. (ap)*tring+ *tring, Ans ! D. "nu#
-. #hat is the output of the following code? nteger index / 10 nteger counter / "0 o 2 *ystem.debugindex!0 ndex330 Counter330 4 while index // "5 66 counter // "1!0 A. $he de%ug de%ug stat state#ent e#ent &ill repeat repeat outpu outputs ts 'ro# 'ro# 1 to (1. (1. B. $he de%ug de%ug sta state te#en #entt &ill &ill output output (). (). *. $he de%ug de%ug stat state#ent e#ent &ill repeat repeat outpu outputs ts 'ro# 'ro# 1 to (). ().
. 7he debug statement will output outp ut 1. Ans ! 8. #hat area for custom Apex 9xcep:on classes? Choose " answers A. *onstructor 'or custo# "+cepons can onl, accept string -alues as argu#ents. B. *usto# "+cepons "+cepons cannot %e e+tended %, other "+cepon "+cepon classes.
cla sses must extend the base 9xcep:on class . Ans ! *. Custom 9xcep:on classes cla ss names must end with the word ;9xcep:on< ;9xcep:o n< . Ans ! D. Custom 9xcep:on class
=. #hich collec collec:on :on type provi provides des uni>ue uni>ue ey@val ey@value ue pairings pairings of data? data? A. Set . (ap Ans ! C. Arra, . List B. #hat should a developer use to post a message on chaer when a piclist Deld called *tatusEEc on a custom object Applica:onEEc is set to FApprovedG? A. se a /or0o& /or0o& Rule and use the 2Post 2Post to *ha3er4 acon &hen the records records #eets the the criteria. B. se the the strea# strea#ing ing AP5 AP5 to post to *ha3er *ha3er.. *. se *onn *onnect ectApi Api 'ro 'ro# # Schedu Scheduled led Ape+ Ape+..
. %se $rocess uilder to post to Chaer based on mee:ng the re>uired criteria. Ans ! . #hat does the context variable 7rigger.old represent in an update opera:on? A. A #ap o' o' 5Ds to to the old old -ersion -ersion o' o' the recor record. d. 6 Ans 7 B. $he sa#e sa#e -alue -aluess o' $rigg $rigger er.ne .ne& & *. $he current current -alues -alues o' o' the recor records ds 8ring the the trigger trigger..
. 7he previous version values of the records Dring the trigger. I. n which two org types can a developer create new Apex classes? Choose " answers A. nli nli#i #ite ted d "di "dion on B. "nt "nterpri erprise se "di "dion on
C. eveloper 9di:on Ans ! . *andbox Ans ! J. %niversal Containers %C! has an integra:on with its Accoun:ng system that creates tens of KKKKKK *alesforce in a nightly batch. %C wants to add automa:on that can aempt to match Leads KKKKKKK %sing the 9mail Address Deld on the insert. %C is concerned about the performance of the KKKKKKK #hich tool should %C use to automate this process? A. Ape+
. $rocess uilder with an Autolaunched low Ans ! *. /or0 or0o& o& Rule Ruless D. Proc Proces esss Buil Builde derr
15. A developer encounters A$9M heap limit errors in a trigger. #hich two methods should the developer use to avoid this error? Choose " answers A. Re#o-e or set collecons to null a9er use.
. %se *NOL for loops instead of assigning large >ueries results to a single collec:on and looping KKKKK collec:on. Ans ! C. %se the transient eyword when declaring variables. Ans ! D. Quer, and store 8elds 'ro# the related o%ject in a collecon &hen updang related o%jects.
11. A sales manager wants to mae sure that whenever an opportunity stage is changed to FClosed #on+ Fa new case will be created for the support team to collect necessary informa:on from the customer. How should a developer accomplish this? A. Create a $rocess uilder to create the new case . Ans ! B. *reate a &or0o& rule to create the ne& case. *. *reate a loo0up 8eld to the *ase :%ject on the opportunit, o%ject. D. Set up a -alidaon rule on the :pportunit,.Stage.
1". #hich two are true regarding Apache PaQa on Herou? Choose " answers A. s a distributed commit log for communica:on between services. Ans ! B. 5s an add;on that creates a long ter# data store.
C. s a messaging bacbone for building distributed applica:ons. Ans ! D. 5s designed to #o-e s#all -olu#es o' ephe#eral data.
1-. #hat are three characteris:cs of sta:c methods? Choose - answers A. ni:aliRed only when a class is loaded Ans ! B. A stac -aria%le is a-aila%le outside o' the scope o' an Ape+ transacon.
C. Allowed only in outer classes. Ans ! D. Allo&ed onl, in inner classes.
9. Are SN7 transmied as part of the view state for a 'isualforce page. Ans ! 18. A developer wants to override a buon using 'isualforce on an object. #hat is the re>uirement? A. $he acon a3ri%ute #ust %e set to a controller #ethod.
. 7he standardController aribute must be set to the object. Ans ! *. $he controller or e+tension #ust ha-e a PageRe'erence #ethod. D. $he o%ject record #ust %e instanated in a controller or e+tension.
1=. How are debug levels adjusted in the eveloper Console? A. nder the Se
clic0 *hange De%ugLe-el.
. %nder the ebug menu , Change Log LevelsT.+ clic Add@Change in the ebugLevel Ac:on column. Ans ! *. nder the Logs ta%> clic0 *hange in the De%ugLe-els panel. D. nder the "dit #enu> clic0 *hange De%ugLe-els.
1B. #hich type of controller should a developer use to include a list of related records for a Custom Nbject record on a 'isualforce page without needing addi:onal test coverage? A. List *ontroller
. *tandard Controller Ans ! *. *ontroller "+tension D. *usto# *ontroller Re' ?h3ps?@@de-eloper.sales'orce.co#@[email protected]; us.pages.#eta@pages@pagesuic0startcusto##apping.ht#
1. A developer created a 'isualforce page with a custom controller to show a list of accounts. 7he page uses the )apexU*electList, component+ with a variable called Fselec:onG+ to show the valid values for Account.7ype. 7he page uses an )apexUpageloc7able, component to display the list of accounts+ where the itera:on variable is FacctG. 7he developer wants to ensure that when a user selects a type on the )apexUselectList, component+ only accounts with that type are shown on the page. #hat should the developer do to accomplish this? A. Add the Rendered C 6Acct.t,peCCselecon7 a3ri%ute to the pageBloc0$a%le co#ponent. B. *reate #ulple lists in the controller that represent the rele-ant accounts 'or each account t,pe &hen the page loads> then re'erence the correct one d,na#icall, on the pageBloc0$a%le. *. *reate a co#ponent 'or each opon and use a -aria%le &ith hide para#eter on the ele#ent.
. %se the onChange event to update the list of accounts in the controller when the value changes+ and then reKrender the pageloc7able. Ans ! 1I. #hat are three ways for a developer to execute tests in an org? Choose - answers A. 7ooling A$ Ans ! . *etup (enu Ans ! C. eveloper Console Ans ! D. Bul0 AP5 ". Metadata AP5
1J. A developer is crea:ng test coverage for a class and needs to insert records to validate func:onality.
#hich method annota:on should be used to create records for every method in the test class? A. Eis$est6SeeAllDateCtrue7 B. EPre$est
C. V7est*etup Ans ! D. EBe'ore$est
"5. #hat is the printed from the following code? nteger a / 50 nteger b0 a / a330 a330 nteger c / aW=0 *tring s / *tring.valuec! 3 a0 *ystem.debugs 3 ;0< 3 a 3<0< 3 b!0 A. F1G1G)
. =1010null Ans ! *. HG1G null D. HG1G)
"1. #hich *NOL >uery successfully returns the Accounts grouped by name? A. *9L9C7 Same+ (axCreatedate! &N( Account X&N%$ Y Same Ans ! B. S"L"*$ $,pe> Ia#e> Ma+6*reatedDate7 JR:M Account KR:P B Ia#e L5M5$ F *. S"L"*$ $,pe> Ma+6*reatedDate7 JR:M Account KR:P B Ia#e D. S"L"*$ 5d> $,pe> Ma+6*reatedDate7 JR:M Account KR:P B Ia#e
"". A 'isualforce page is wrien with the following controller and extensions. )apexUpage standardController/GAccountG extensions/Gmy9xtensionG, )apexUinputield value /GZaccount.name!G@,)p@, )apexUcommanduon value /G*aveG ac:on/GZsave!G@, )@apexUpage, 7he extension class my9xtension has a public save! method. #hich save method or methods will be used by the 'isualforce page? A. the sa-e #ethod 'ro# the standard*ontroller B. %oth #,"+tension 8rst> then the standard*ontroller#eet *. the sa-e #ethod 'ro# the controller e+tension
. both [ the standardController Drst+ then my9xtension Ans !
"-. Xiven the code blocU
nteger x0 for x / 50 x)150 x3/"! 2 if x//I! brea0 if x//15! brea0 4 *ystem.debugx!0 #hich value will the system.debug statement display? A. N B. 1)
C. I Ans ! D. (
"8. %niversal Containers %C! wants to automate the *ales Npera:ons process for Closed #on Npportuni:es. #hen an Npportunity is mared as Closed #on+ %C wants to update the Account to mar it as a Customer. n addi:on+ %C wants all of the Npportunity Line tems from a Closed #on Npportunity to be added automa:cally as Assets. #hat is appropriate for automa:ng this process? A. /or0o& Rules and Process Builder B. /or0o& Rules *. Process Builder
. $rocess uilder with an Autolaunched low "=. #hat are two beneDts of using the Lightning Component ramewor? Choose " answers A. Lightning *o#ponents render on the ser-er> ensuring greater securit, and access control. B. $he Lightning *o#ponent Jra#e&or0 includes li%raries 'or integrang &ith popular &e% ser-ices. C. Lightning components render on the client+ providing performance beneDts. Ans ! . Lightning Components are built using web standards+ ensuring crossKbrowser compa:bility. Ans ! "B. #hen are code coverage calcula:ons updated? A. #hen unit tests are run on an organiRa:on. Ans ! B. /hen Ape+ code is sa-ed. *. /hen changes are #ade to an organiOaons con8guraon. D. /hen a deplo,#ent is -alidated. "I. How can a custom type be iden:Ded as uni>ue when added to a set? A. Methods in the class #ust %e glo%al. B. $he class #ust ha-e a #ethod &ith the E5n-oca%leMethod annotaon. C. 7he class must implement the 9>uals and Hashcode methods. Ans ! D. Methods in the class #ust %e stac.
". A lead object has a custom Deld $riorE9mailEEc. 7he following trigger is intended to copy the current 9mail into the $riorE9mailEEc Deld any :me the 9mail Deld is changedU trigger test on Lead before update! 2
for Lead dU trigger.new! 2 ifd.9mail Z/ trigger.old(ap.getd.id!.email! 2 d.$riorE9mailEEc / trigger.old(ap.getd.id!.email0 %pdate d0 4 4 4 #hich type of excep:on will this trigger cause? A. A co#pile #e e+cepon B. A li#it e+cepon &hen doing a %ul0 update *. A null re'erence e+cepon D. A (L excep:on Ans ! "J. A developer created a Lightning Component to display a short text summary for an object and wants to use it with mul:ple Apex classes. How should the developer design the Apex classes? A. 9xtend each class from the same base class that has a method get7ext*ummary! that returns the summary. Ans ! B. a-e each class de8ne #ethod get$e+tSu##ar,67 that returns the su##ar,. *. a-e each class de8ne #ethod get:%ject67 that returns the s:%ject that is controlled %, the Ape+ class. D. a-e each class i#ple#ent an inter'ace that de8nes #ethod get$e+tSu##ar,67 that returns the su##ar,. -5. #hat are two uses for 9xternal s? Choose " answers A. $o create a record in a de-elop#ent en-iron#ent &ith the sa#e Sales'orce 5D as in another en-iron#ent. . 7o prevent an import from crea:ng duplicate records using %psert. Ans ! C. 7o create rela:onships between records imported from an external system. Ans ! D. $o iden', the s:%ject t,pe in Sales'orce. -1. A developer created a helper class with a method that can be called from 'isualforce pages+ web services+ triggers+ and even anonymous code. #hen the method is called from a trigger+ the developer needs to execute logic that should not be executed if the method is called from anywhere else. How can the developer determine if the code is executed in a trigger context? A. Chec if 7rigger.is9xecu:ng // true. Ans ! . *hec0 i' S,ste#.e+ecuon*onte+t CC $rigger. C. *hec0 i' $rigger.ne&Map C null. . se the e+ecuon:n$rigger annotaon on the #ethod de8nitaion. -". %niversal Containers re>uires *ervice &epresenta:ves to update all Cases at least once every three days. 7o mae sure this policy is obeyed+ a developer has been ased to implement a Deld that displays the number of days since the last Case update. #hat should the developer use to conDgure the solu:on? A. /or0o& rule . Scheduled Ape+ *lass C. ormula Deld Ans !
. Process Builder --. #hich two are true regarding a yno? Choose " answers A. 5s a light &eight M used to run code on the ero0u PlaTor#. . as the a%ilit, to sleep as a standard and per'or#ance D,no. C. Has 9phemeral Dlesystems and is rebooted every "8 hours. Ans ! . s a lightweight linux container used in a collec:on to run Herou applica:ons. Ans ! -8. A developer executes the following >uery in Apex to retrieve a list of contacts for each accountU List)Account, accounts / \*elect + Same+ *elect + Same from Contacts! from Account]0 #hich two excep:ons may occur when it executes? Choose " answers A. *P li#it e+cepon due to the co#ple+it, o' the uer, . S:QL uer, li#it e+cepon due to the nu#%er o' ueries C. *NOL >uery row limit excep:on due to the number of contacts Ans ! . *NOL >uery row limit excep:on due to the number of accounts Ans ! -=. A method is passed a list of generic sNbjects as a parameter. #hat should the developer do to determine which object typeAccount+ Lead+ or Contact+ for example! to cast each subject? A. se a tr,;catch construct to cast the s:%ject into one o' the three s:%ject t,pes. . %se the get*Nbject7ype method on each generic sNbject to retrieve the sNbject toen. Ans ! *. se the getS:%jectIa#e #ethod on the s:%ject class to get the s:%ject na#e. D. se the 8rst three characters o' the s:%ject 5D to deter#ine the s:%ject t,pe. -B. #hich two describe Herou &edis? Choose " answers A. s an inKmemory eyKvalue data store+ run by Herou. Ans ! . s provisioned and managed as an addKon. Ans ! *. 5s a repositor, 'or storing large i#agesU D. 5s an opon 'or long ter# data storageU -. #hat are two tes:ng considera:ons when deploying code from a sandbox to produc:on? Choose " answers A. Ape+ *ode reuires 1))V co-erage. B. WFV o' tests #ust e+ecute &ithout 'ailure. C. 155^ of tests must execute without failure. Ans ! . Apex Code re>uires =^ coverage. Ans ! -I. #hen viewing Ouote+ the sales representa:ve wants to easily see how many discounted items are included in the Ouote Line tems. #hat should a developer do to meet this re>uirement? A. *reate a /or0o& Rule on the Quote Line 5te# o%ject that updates a 8eld on the parent Quote &hen the ite# is discounted. . Create a rollKup summary Deld on the Ouote Line tem Ouan:ty Deld+ Dltered for only discounted Ouote Line tems. Ans ! *. *reate a trigger on the Quote o%ject that ueries the Quant, 8eld on discounted Quote Line 5te#s. D. *reate a 'or#ula 8eld on the Quote o%ject that per'or#s a SM on the Quote Line 5te# Quant, 8eld> 8ltered 'or onl, discounted Quote Line 5te#s.
-J. %sers report mul:ple intermient errors and unexpected results when saving a record. %pon inves:ga:on+ the Dnds that triggers are execu:ng more than once. #hat is a poten:al solu:on to solve this situa:on? A. Disa%le all triggers and use &or0o&s. B. se a pri-ate class -aria%le to ensure that the trigger onl, run once. C. %se a sta:c variable to chec if the trigger has already run. Ans ! D. se a one trigger per o%ject approach. 85. A lead record that has a single related Campaign(ember object is converted into a new account+ contact+ and Npportunity. #hich object will the Campaign(ember reference using a looup Deld a_er conversion? A. $he Account B. $he :pportunit, C. 7he Contact Ans ! D. $he Product( 81. #hich three declara:ve Delds are correctly mapped to variable types in Apex? Choose - answers A. $e+tArea #aps to List o' t,pe String B. Iu#%er #aps to 5nteger C. Checbox maps to oolean Ans ! . ate@7ime maps to ate:me Ans ! 9. Sumber maps to ecimal Ans ! 8". A developer is ased to write nega:ve tests as part of the unit tes:ng for a method that calculates a person
8-. #hat are two ways a developer should deploy code from a developer org to an unrelated produc:on org? Choose " answers A. Login to the producon org and set the de-eloper org as an in%ound connecon in the Deplo,#ent Se create an inco#ing *hange Set in the producon org> and upload the 8les directl,. . $acage the code as an unmanaged pacage and install it in the produc:on org. Ans ! 9. %se an 9 to upload the new code directly into the produc:on org using the metadata A$ Ans ! 88. #hat are two considera:ons for deciding to use a rollKup summary Deld? Choose " answers
A. Roll;up su##ar, 8elds do not cause -alidaon rules on the parent o%ject unless that o%ject is edited separatel,. . &ollKup summary can be performed on formula Delds+ but if their formula contains an `9rror result+ it may aect the summary value. C. &ollKup cannot be performed on formula Delds that use crossKobject references or onKtheK y calcula:ons such as SN#!. Ans ! D. Roll;up cannot %e per'or#ed on 'or#ula 8elds.
8=. #hat are two considera:ons for conver:ng a Looup to a (asterKetail rela:onship? Choose " answers A. 7he organiRa:onKwide default changes to Controlled by $arent. Ans ! B. $he organiOaon;&ide de'ault changes to Pu%lic Read@/rite. C. f there are exis:ng records with a null value in the Looup Dled+ an error will occur. Ans ! D. All the null -alues in the Loo0up 8eld &ill %e replaced %, de'ault -alues. 8B. A developer has created a 'isualforce $age and Apex Controller that uses the with *haring eyword. 7he page will be used by *ales (anagers and should only display Accounts owned by *ales &epresenta:ves who report to the running *ales (anager. 7he organiRa:on [ wide sharing for Accounts is set to $rivate. #hich addi:onal set of steps should the developer tae? A. *reate one Pro8le> one Per#ission Set> and one Role. B. *reate t&o Pro8les> one Per#ission Set> and one Role. *. *reate one Pro8le> t&o Per#ission Sets> and one Role. . Create one $roDle+ one $ermission *et+ and two &oles. Ans ! 8. How should a developer prevent a recursive trigger? A. se a trigger handler. B. se a pri-ate Boolean -aria%le. *. se a 2one trigger per o%ject4 pa3ern. . %se a sta:c oolean variable. Ans !
8I. #hich three op:ons allow a developer to use custom styling in a 'isualforce page? Choose - answers A. A sta:c resource Ans ! . )apexUstylesheet, tag Ans ! *. ape+?st,le! tag . nline C** Ans ! ". ape+?st,lesheets! tag 8J. A developer is ased to create a $ >uote document formaed using the company
A. B. C. D.
se addional Ape+ logic &ithin the controller to uer, 'or the Ia#e 8eld. se S:QL s,nta+ to 8nd the related Accounts Ia#e 8eld. %se the 2Zcontact.Account.Same4 merge Deld syntax. Ans ! se an addional standard controller 'or Accounts.
=1. How can a developer set up a debug log on a speciDc user? A. *et up a trace ag for the user+ and deDne a logging level and :me period for the trace. Ans ! B. 5t is not possi%le to setup de%ug logs 'or users other than ,oursel'. *. As0 the user 'or access to their account credenals> log in as the user and de%ug the issue. D. *reate Ape+ code that logs code acons into a custo# o%ject. =". A developer is tased with crea:ng a schema to trac (ovies+ Actors+ and Contracts. A single (ovie can have many Contracts and a single Actor can have many Contacts 9ach Contract is owned and ac:vely managed by a single user. #hich schema should be created to enable users to easily manage the Contracts they own0 without re>uiring access to the movie or the actor records? A. A Master Detail Relaonship to the Mo-ie o%ject and a Loo0up Relaonship to the Actor o%ject. B. A Master Detail Relaonship to the Mo-ie o%ject and Master;Detail Relaonship to the Actor o%ject. C. A Looup &ela:onship to the (ovie object and a Looup &ela:onship to the Actor object.
Ans ! D. A Loo0up Relaonship to the Mo-ie o%ject and a Master;Detail Relaonship to the Actor o%ject.
=-. #hat is a ey dierence between a (asterKetail &ela:onship and a Looup &ela:onship? A. /hen a record o' a #aster o%ject in a Master;Detail Relaonship is deleted> the detail records are 0ept and not deleted. B. A Loo0up Relaonship is a reuired 8eld on an o%ject. C. A (asterKetail &ela:onship detail record inherits the sharing and security of its master record. Ans ! D. /hen a record o' a #aster o%ject in a Loo0up Relaonship is deleted> the detail records are also deleted. =8. A developer needs to display all of the available Delds for an object. n which two ways can the developer retrieve the available Delds if the variable myNbject represents the name of the object? Choose " answers A. se getKlo%alDescri%e67.get6#,:%ject7.getDescri%e67.8elds.getMap67 to return a #ap o' 8elds. B. se #,:%ject.s:%ject$,pe.getDescri%e67.8eldSet67 to return a set o' 8leds. C. %se *Nbject7ype.myNbject.Delds.get(ap! to return a map of Delds. Ans ! . %se *chema.describe*Nbjectsnew *tring\]2myNbject4!\5].Delds.get(ap! to return a map of Delds. Ans ! ==. A user selects a value from a mul:Kselect piclist. How is this selected value represented in Apex?
A. . *. D.
As a ListString! &ith one ele#ent As a *tring Ans ! As a SetString! &ith one ele#ent As a String ending &ith a co##a
=B. #hen would the use of Herou $ostgres a developer needs to display? A. $o interconnect Microso9 SQL ser-ers to ero0u Applicaons B. $o store user generated pictures and &ord docu#ents *. $o cache co##onl, accessed data 'or 'aster retrie-al . 7o store and retrieve data using the *tructured Ouery Language Ans ! =. #hat are two features of Herou Connect? Choose " answers A. Displa,ing data 'ro# an e+ternal data store -ia "+ternal :%jects . idirec:onal syncs+ allowing data to be wrien into *C Ans ! C. Sear &eal 7ime *ync between Herou $ostgres and *alesforce Ans ! D. Real $i#e S,nc %et&een Sales'orce and Postgres =I. A developer needs to avoid poten:al system problems that can arise in a mul:Ktenant architecture. #hich re>uirement helps prevent poorly wrien applica:ons from being deployed to a produc:on environment? A. All -alidaon rules #ust %e ac-e %e'ore the, can %e deplo,ed. . %nit tests must cover at least =^ of the applica:on
B. E$estisi%le C. Limits+ start7est+ stop7est Ans ! D. E$estSetup
B-. #hat are two correct examples of the (odel in the *alesforce ('C architecture? Choose " answers A. /or0o& rule on the *ontact o%ject B. Standard Lightning co#ponent C. *tandard Account looup on the Contact object Ans ! . O on the custom #iRardEEc object Ans ! 9. Custom Deld on the custom #iRardEEc object Ans ! . *tandard Account looup on the Contact object Ans ! K. Standard Lightning co#ponent
H. /or0o& rule on the *ontact o%ject
B8. A developer writes the following codeU List)Account, acc / \*9L9C7 d &N( Account L(7 15]0 elete acc0 atabase.empty&ecyclein acc!0 *ystem. ebug Limits.get(L*tatements ! 3<+ ;3 Limits.getLimit(L*tatements ! !0
#hat is the result of the debug statement? A. . C. .
"+1=5 Ans ! 1>1F) 1>1)) (>())
B=. An Nrg has a single account named ueryU List)Account, accounts / \*elect + *elect + Same from contacts! from Account where Same/ FSoContacts<]0 A. . C. .
Accounts[)] is Iull. Accounts[)] contacts is in-alid Ape+. Accounts\5] contacts is an empty list. Ans ! A Quer,"+cepon is thro&n
BB. #hat are three ways for a developer to execute tests in an org? choose - answers
A. . C. . 9.
Bul0 AP5 MetaData AP5 7ooling A$ Ans ! eveloper console Ans ! *etup menu Ans !
B. #hich approach should be used to provide test data for a test class? A. . C. .
%se a test data factory class to create test data Ans ! Quer, 'or e+isng records in the data%ase Access data in E$estisi%le class -aria%les "+ecute anon,#ous code %loc0s that create data.
BI. #hen should an apex 7rigger be re>uired instead of a process builder process? A. #hen an ac:on needs to be taen on a delete or undelete+ or before a (L opera:on is executed Ans ! . /hen a record needs to %e created C. /hen a post to cha3er needs to %e created . /hen #ulple records related to the triggering record need to %e updated BJ. #hich set of rollKup types are available when crea:ng a roll up summary Deld? A. . C. .
CN%S7+ *%(+ (S+ (AM Ans ! A"RAK"> *:I$> SM> M5I> MAX A"RAK"> SM> M5I> MAX SM> M5I> MAX
5. %sing the schema builder+ a developer tries to change the A$ name of a Deld that is referenced in an Apex 7est Class. #hat is the end results? A. . C. .
$he AP5 na#e o' the 8eld is changed> and a &arning is issued to update the class $he AP5 na#e o' the 8eld and the re'erence in the test class is updated $he AP5 na#e o' the 8eld and the re'erence in the test class is changed 7he A$ name is not changed and there are no other impacts. Ans !
1. #hy would a developer consider using a custom controller over a controller extension? A. . C. .
$o increase the S:QL uer, go-ernors li#its $o le-erage %uilt;in 'unconalit, o' a standard controller $o en'orce user sharing se
". #hich two plaorm features allow for the use of unsupported languages? Choose " answers. A. . C. .
App.json ocer Ans ! ero0u A*M uildpacs Ans !
-. A developer created a visualforce page and a custom controller with methods to handle dierent buons and events that can occur on the page. #hat should the developer do to deploy to produc:on? A. . C. .
*reate a test page that pro-ides co-erage o' the custo# controller *reate a test class that pro-ides co-erage o' the -isual'orce page Create a test class that provides coverage of the custom controller Ans ! *reate a test page that pro-ides co-erage o' the -isual'orce page
8. A developer needs to create a visualforce page that displays case data. 7he page will be used by both support reps and support managers. 7he support rep proDle does not allow visibility of the customerE*a:sfac:onEc ield+ but the support manager proDle does. How can the developer create the page to enforce Deld level security and eep future maintenance to a minimum? A. . C. .
*reate one -isual'orce page 'or use %, %oth pro8les se a ne& support #anager per#ission sets *reate a separate -isual'orce page 'or each pro8le %se a custom controller that has the with sharing eywords Ans !
=. #hich three op:ons allow a developer to use stylesheets? A. . C. . 9.
A sta:c resource Ans ! )ApexUstylesheet,tag Ans ! ape+?st,lesheets!tag nline C** Ans ! ape+?st,le!tag
B. A plaorm developer needs to write an apex method that will only perform an ac:on if a record is assigned to a speciDc &ecord 7ype. #hich two op:ons allows the developer to dynamically determine the of the re>uired &ecord 7ype by its name? Choose " answers A. . C. .
ardcode the 5D as a constant in an Ape+ class 9xecute a *NOL >uery on the &ecord7ype Nbject Ans ! %se the get&ecord7ypenfosySame!method in the escribe*Nbject&esult Class. Ans ! Ma0e an out%ound &e% ser-ice call to the S:AP AP5.
. #hich approach should a developer use to add pagina:on to a visualforce page? A. . C. .
$he e+tension a3ri%ute 'or a page A standard*ontroller $he acon a3ri%ute 'or a page A *tandard*etController Ans !
I. A eveloper needs to test an invoicing system integra:on. A_er reviewing the numbers of transac:on re>uired for the test+ the developer es:mates that the test data will total about "X of data storage. $roduc:on data is not re>uired for integra:on tes:ng. #hich two environments meet the re>uirements for tes:ng? Choose " answers
A. . C. . 9.
ull sandbox Ans ! De-eloper sand%o+ De-eloper Pro Sand%o+ De-eloper "dion $ar:al *andbox Ans !
J. #hat is a capability of the )ltngUre>uire, 7ag that is used for loading external javascript libraries in lightning components? Choose - answers A. . C. . 9.
Loading scripts in parallel Ans ! NneK:me loading from duplicate scripts Ans ! Loading 8les 'ro# docu#ents *pecifying loading order Ans ! Loading e+ternall, hosted scripts
I5. #hat is a re>uirement for a class to be used as a custom visualforce controller? A. . C. .
An, top;le-el Ape+ class that has a constructor that returns a PageRe'erence An, top;le-el Ape+ class that i#ple#ents the controller inter'ace Any topKlevel Apex class that has a default+ noKargument constructor Ans ! An, top;le-el Ape+ class that e+tends a PageRe'erence
I1. 7he opera:on manager at a construc:on company uses a custom object called (achinery to manage the usage and maintenance of its cranes and other machinery. 7he manager wants to be able to assign machinery to dierent construc:on jobs+ and trac the dates and cost associated with each job. (ore than one piece of machinery can be assigned to one construc:on job. #hat should a developer do to meet these re>uirements? A. *reate a loo0up 8eld on the #achiner, o%ject to the construcon jo% o%ject . *reate a juncon o%ject &ith Master;Detail Relaonship to %oth the #achiner, o%ject and the construcon jo% o%ject. C. Create a looup Deld on the construc:on job object to the machinery object Ans ! . *reate a Master;Detail loo0up 8eld on the#achiner, o%ject tothe construcon jo% o%ject I". #hich three tools can deploy metadata to produc:ons? Choose - answers. A. . C. . 9.
Data Loader Change set from sandbox Ans ! *hange set 'ro# de-eloper org orce.com 9 Ans ! (etadata A$ Ans !
I-. How should a developer create a new custom excep:on class? A. $ublic class Custom9xcep:on extends 9xcep:on24 Ans ! . *usto#"+cepon e+ C ne& 6*usto#"+cepon7 "+cepon67G C. 6"+cepon7 *usto#"+cepon e+ C ne& "+cepon67G
. Pu%lic class *usto#"+cepon i#ple#ents "+ceponYZ I8. #hich two number expression evaluate correctly? Choose " answers A. . C. .
5nteger 5 C .1N1F\G ecimal / -.181=J0 Ans ! Long 5 C .1N1F\G ouble /-.181=J0 Ans !
I=. #hat are the eight ocially supported languages on the Herou $laorm? A. . C. .
Lisp> PP> Iode> Ru%,> Scala> as0ell> Ko> "rlang *> *^^> Iode> Ru%,> _a-a> PP> Ko> .Iet Iode> Ru%,> _a-a> PP> P,thon> . Iet> *^^ Sode+ &uby+ ava+ $H$+ $ython+Xo+ *cala+ Clojure. Ans !
IB. A developer wrote a unit test to conDrm that a custom excep:on wors properly in a custom controller+ but the test failed due to an excep:on being thrown. #hat steps should the developer tae to resolve the issue and properly test the excep:on? A. . C. .
se the 8nall, %loc0 &ithin the unit test to populate the e+cepon se data%ase #ethods &ith all or none set to Jalse %se try@catch within the unit test to catch the excep:on Ans ! se $est.isRunning$est67 &ithin the custo# *ontroller
I. A developer has the controller class belowU $ublic with sharing class myooController 2 $ublic integer prop 2 get0 private set04 4 #hich code bloc will run successfully in an execute anonymous window? A. myooController m / new myooControler !0 *ystem.asseertm.prop//null!0 Ans ! B. #,Joo*ontroller # C ne& #,Joo*ontroler 67G` S,ste#.asseert6#.propCC17G *. #,Joo*ontroller # C ne& #,Joo*ontroler 67G` S,ste#.asseert6#.propCC)7G D. #,Joo*ontroller # C ne& #,Joo*ontroler 67G` S,ste#.asseert6#.propCnull7G II. #hat is a beneDt of using an a_er insert trigger over using a before insert trigger? A. An a9er insert trigger allo&s a de-eloper to %,pass -alidaon rules &hen updang 8elds on the ne& records . An a9er insert trigger allo&s a de-eloper to #a0e a callout to an e+ternal ser-ice. C. An a_er insert trigger allows a developer to insert other objects that reference the new records Ans ! . An a9er insert trigger allo&s a de-eloper to #odi', 8elds in the ne& record &ithout a uer,.
IJ. #hile wri:ng a test class that covers an NpportunityLinetem trigger+ a eveloper is unable to create a standard $riceboo since one already exist in the org. how should the developer overcome this problem? A. . C. .
se E5s$est6SeeAllDataCtrue7 and delete the e+isng standard Price%oo0. se E$estisi%le to allo& the test #ethod to see the standard Price%oo0. %se 7est.get*tandard$ricebbod!to get the standard $riceboo . Ans ! se $est.loaddata67 and a Stac Resource to load a standard Price%oo0.
J5. #hat is the correct invoca:on to push code to the app sushiKprod from the command line? A. . C. .
ero0u push ; ; app sushi;prod git push #aster ero0ugit push #aster git push herou master K K app sushiKprod Ans !
J1. #hen an Account
$rocess uilder Ans ! *usto# Bu3on Apex 7rigger Ans ! /or0o& Rule
J". A developer is ased to set a $iclist Deld to ;(onitor< on any new Leads owned by a subset of %sers. How should the developer implement this re>uest? A. . C. .
Create a lead #orow &ule ield %pdate Ans ! *reate an a9er insert Lead trigger *reate a Lead 'or#ula 8eld *reate a %e'ore insert lead $rigger
J-. #hen viewing a Ouote+ the sales representa:ve wants to easily see how many discounted items are included in the Ouote Line tems. #hat should a developer do to meet this re>uirement? A. *reate a &or0o& rule on the Quote Line 5te# :%ject that updates a 8eld on the parent Quote &hen the ite# is discounted . Create a rollKup summary Deld on the Ouote Nbject that performs a *%( on the Ouote Line tem Ouan:ty Deld+ Dltered for only discounted Ouote Line tems. Ans ! C. *reate a $rigger on the Quote :%ject that ueries the Quant, 8led on discounted Quote Line 5te#s . *reate a 'or#ulat 8eld on the Quote :%ject that per'or#s a SM on the Quote Line 5te# Quant, 8eld> 8ltered 'or onl, discounted Quote Line 5te#s.
J8. A visualforce interface is created for Case (anagement that includes both standard and custom func:onality deDned in an Apex class called myController9xtension. 7he visualforce page should include which )apexUpage, aributes! to correctly implement controller func:onality? A. . C. .
standardController / FcaseG and extensions /G myController9xtensionG Ans ! e+tensionsC4#,*ontroller"+tension4 controllerC4#,*ontroller"+tension4 controller C 2case4 and e+tensions C4#,*ontroller"+tension4
J=. #hich two strategies should a developer use to avoid hing governor limits when developing in a mul:Ktenant environment? Choose two answers A. . C. .
use -aria%les &ithin Ape+ classes to store large a#ounts o' data use collecons to store all 8elds 'ro# a related o%ject and not just #ini#all, reuired 8elds use methods from the FL(7*G class to monitor governor limits Ans ! use *NOL for loops to iterate data retrieved from >ueries that return a high number of rows Ans !
JB. #hich statement results in an Apex compiler error? A. . C. .
Mapid> Lead! i#ap C ne& #ap 5d> Lead!6[Select 5D 'ro# Lead Li#it ]7G List)string, s / List)string, 2 ;a<+ %CH>c>dCWG Date D1 C Date.$oda,67> d( C DA$".alue:'6()1;)1;)17G
J. How should a developer avoid hing the governor limits in test methods? A. . C. .
%se 7est.start7est! to reset governor limits Ans ! se E$estisi%le on #ethods that creates records se E5s$est 6SeeAllDataCtrue7 to use e+isng data se $est.loadData67 to load data 'ro# a stac resource.
JI. A newly hired developer discovers that there are mul:ple triggers on the case object. #hat should the developer consider when woring with triggers? A. . C. .
7rigger execu:on order is not guaranteed for the same sNbject Ans ! $rigger e+ecuon order is %ased on creaon date and #e nit test #ust speci', the trigger %eing tested. De-elopers #ust dictated the order o' the trigger e+ecuon
JJ. #hat are three characteris:cs of sta:c methods? Choose - answers A. . C. . 9.
ni:aliRed only when a class is loaded Ans ! A stac -aria%le is a-aila%le outside o' the cope o' an Ape+ transacon Allowed only in outer classes Ans ! Allo&ed onl, in inner classes Are Sot transmied as part of the view state for a 'isualforce page Ans !
155.
efore pung an app into produc:on+ which step should be taen? A. . C. .
151.
&un the produc:on chec feature via the web interface Ans ! S&itch to a producon data%ase 5nsure that ,ou ha-e installed a per'or#ance introspecon add;on Scale ,our d,nos
#hat are two beneDts of the lightning component framewor? Choose " answers A. . C. .
15".
5t allo&s 'aster PDJ generaon &ith lightning co#ponents 5t si#pli8es co#ple+it, &hen %uilding pages> %ut not applicaons t provides an eventKdriven architecture for beer decoupling between components Ans ! t promotes faster development using outKofKtheKbox components that are suitable for destop and mobile devices. Ans !
#hat should a developer use to implement an automa:c Approval $rocess *ubmission for
Cases? A. . C. . 15-.
A &or0o& rule $rocess builder Ans ! Scheduled Ape+ An Assign#ent rule
#hich tool allows a developer to send re>uests to the salesforce &9*7 A$s ad view the
responses? A. . C. . 158.
De-eloper *onsole R"S$ ta% R"S$ resource Path RL #orbench &est 9xplorer Ans ! Jorce.co# 5D" R"S$ "+plorer $a%
A developer woring on a :me management applica:on wants to mae total hours for
each :mecard available to applica:on user. A :mecard entry has a (asterK etail rela:onship to a :mecard. #hich approach should the developer use to accomplish this declara:vely? A. A roll;up Su##ar, 8eld on the $i#ecard :%ject that calculates the total hours 'ro# #ecard entries 'or that #ecard . A process builder process that updates a Deld on the :mecard when a :mecard entry is created Ans ! C. An ape+ trigger that sues an aggregate uer, to calculate the hours 'or a gi-en #ecard and stores it in a custo# 8eld. . A -isual'orce page that calculates the total nu#%er o' hours 'or a #ecard and displa,s it on the page. 15=.
#here can a developer iden:fy the :me taen by each process in re>uest using eveloper
console log inspector.
A. . C. .
15B.
Sa-e order ta% under "+ecuon :-er-ie& panel Per'or#ance $ree ta% under Stac0 $ree Panel 7imeline tab under 9xecu:on Nverview panel Ans ! "+ecuon tree ta% under Stac0 $ree Panel
n a single record+ a user selects mul:ple values from a mul:Kselect piclist. How are the
selected values represented in Apex? A. . C. . 15.
As a setString! &ith each -alue as an ele#ent in the set As a listString! &ith each -alue as an ele#ent in the list As a string with each value separated by a semi colon Ans ! As a string &ith each -alue separated %, a se#i co##a
#hich approach should a developer tae to automa:cally add aG (aintenance $lanG to
each opportunity that includes an FAnnual *ubscrip:onG when an opportunity is closed? A. . C. . 15I.
Build an :pportunit,Line5te# trigger that adds a PriceBoo0"ntr, Record Build an :pportunit, trigger that to add :pportunit,Line5te# Record Build an :pportunit, trigger that addsPriceBoo0"ntr, Record uild an NpportunityLinetem trigger to add NpportunityLinetem &ecord Ans !
#hat are two uses of 9xternal *? Choose " answers A. 7o prevent an import from crea:ng duplicate records using %psert Ans ! . $o iden', the s:%ject t,pe in Sales'orce C. $o create a record in a de-elop#ent en-iron#ent &ith the sa#e sales'orce 5D as in another en-iron#ent . 7o create rela:onships between records imported from an external system. Ans !
15J.
#hat are two valid op:ons for itera:ng through each Account in the collec:on List
)Account, named AccountList? Choose " answers. A. . C. . 115.
#hich three op:ons can be accomplished with formula Delds? A. . C. . 9.
111.
for nteger i/50 i)AccountList. *iRe!0i33!2T4 Ans ! 'or 6List L ? AccountList7 Y=Z 'or6AccountList7Y=Z for Account theAccount U AccountList!2T4 Ans !
Xenerate a lin using the H$9&LSP func:on to a speciDc record in a legacy system Ans ! etermine if a date:me Deld has passed using the SN# func:on Ans ! etermine which of three dierent images to display using func:on Ans ! Return and displa, a 8eld -alue 'ro# another o%ject using the L::bP 'uncon Displa, the pre-ious -alue 'or a 8eld using the PR5:RAL" 'uncon #hich two plaorm features align to the controller por:on of ('C architecture
A. Standard :%jects
. #orow &ules Ans ! C. Apex &ules Ans ! . Jield updates 11".
A eveloper wants to override a buon using visualforce on an object. #hat is the
re>uirement? A. . C. . 11-.
$he o%ject record #ust %e instanated in a controller or e+tension 7he standardController aribute must be set to the object Ans ! $he controller or e+tension #ust ha-e a PagerRe'erence Method $he Acon a3ri%ute #ust %e set to a controller #ethod
#hich two Apex data types can be used to reference a *alesforce record ynamically?
Choose two answers A. . C. . 118.
9S%( Ans ! "+ternal 5D s:%ject Ans ! A developer tased with crea:ng a schema to trac (ovies+ Actors+ and contracts. A single
movie can have many contracts and a single actor can have many contracts. 9ach contract is owned and ac:vely managed by a single user. #hich schema should be created to enable user to easily manage the contract they own0 without re>uiring access to the movie or the actor records? A. A #aster detail relaonship to the #o-ie o%ject and a loo0up relaonship to the actor o%ject . A looup rela:onship to the movie object and a looup rela:onship to the actor object Ans ! C. A loo0up relaonship to the #o-ie o%ject and a #aster detail relaonship to the actor o%ject . A #aster detail relaonship to the #o-ie o%ject and a #aster detail relaonship to the actor o%ject 11=.
#hen would the use of Herou $ostgres be appropriate? A. . C. .
11B.
$o interconnect Microso9 SQL Ser-ers to ero0u Applicaons 7o store and retrieve data using the *tructured Ouery Language Ans ! $o store user generated pictures and &ord docu#ents 7o cache commonly accessed data for faster retrieval Ans !
#hat are two considera:ons for conver:ng a looup to a (asterKdetail rela:onship?
Choose " answers A. . C. .
All the null -alues in the loo0up 8eld &ill %e replaced %, de'ault -alues. 7he organiRa:on wide default changes to controlled by parent Ans ! f there are exis:ng records with a null value in the looup Deld+ an error will occur. Ans ! $he organisaon &ide de'aults changes to pu%ic read@&rite
11.
#hat should a developer use to post a message on chaer when a piclist Deld called
*tatusEc on a custom object Applica:onEc is set to FApprovedG? A. se a &or0o& rule and use the 2Post to *ha3er4 Acon &hen the record #eets the criteria. . se connectAP5 'ro# Scheduled Ape+. C. se the strea#ing AP5 to post to cha3er . %se $rocess uilder to post to chaer based on mee:ng the re>uired criteria. Ans ! Herou ynos K light&eight> isolated en-iron#ents that pro-ide co#pute> #e#or,> an :S> and an ephe#eral8les,ste#> D,nos are isolated> -irtualiOed Linu+ containers that are designed to e+ecute code %ased on a user;speci8ed co##an Herou &edisK 0e,;-alue data store> ero0u Redis lets ,ou gain greater -isi%ilit, into per'or#ance> %e3er #anage ,our instances &ith a po&er'ul *L5 and easil, 'ederate data &ith Apache PaQa is a distri%uted co##it log'or 'ast> 'ault;tolerant co##unicaon %et&een producers and consu#ers using #essage %ased topics. baa pro-ides the #essaging %ac0%one 'or %uilding a ne& generaon o' distri%uted applicaons capa%le o' handling %illions o' e-ents and #illions o' transacons. Herou Connect Ksing %i;direconal s,nchroniOaon %et&een Sales'orce and ero0u Postgres>
11I.
A developer is ased to write nega:ve test as part of the unit tes:ng for a method that
calculates a person
Assert that a null -alue is accepted %, the #ethod Assert that future dates are rejected by the method Ans ! $hro&ing a custo# e+cepon in the unit test. Assert that past dates are accepted %, the #ethod.
A developer needs to avoid poten:al system problems that can arise in a mul:Ktenant
architecture. #hich re>uirement helps prevent poorly wrien applica:ons from being deployed to a produc:on environment? A. . C. . 1"5.
All -alidaon rules #ust %e ac-e %e'ore the, can %e deplo,ed S:QL ueries #ust re'erence s:%jects &ith their appropriate na#espace All Ape+ *ode #ust %e annotated &ith the &ith sharing 0e,&ord %nit tests must cover at least =^ of the applica:on
#hich tool can deploy destruc:ve changes to apex classes in produc:on? A. . C. .
#orbench Ans ! Sales'orce setup *hange Sets De-eloper *onsole
1"1.
A visualforce page is wrien with the following controller and extensionsU
)apex.page standardController/GAccountG extensions /Gmy9xtensionG, )apexUinputield vaue/GZAccount.name!G@,)p@, )ApexUcommanduon value/G*aveG ac:on/GZsave!G@, )@apexUpage, 7he extension class my9xtension has a public save!method. #hich save method or methods will be used by the visualforce page? A. . C. . 1"".
$he sa-e #ethod 'ro# the controller e+tension oth [ the standardController Drst+ then my9xtension Ans ! Both the #,"+tension 8rst> the standard*ontroller $he sa-e #ethod 'ro# the standard*ontroller
A user selects a value from a mul:Kselect piclist. How is this selected value represented
in Apex? A. . C. . 1"-.
As a string ending &ith a co##a As a string Ans ! As a listString! &ith one ele#ent As a setstring! &ith one ele#ent
#hat are two considera:ons for deciding to use a roll up summary Deld? A. Roll;up su##ar, 8elds do not cause -alidaon rules on the parent o%ject unless that o%ject is edited separatel, . Roll;up cannot %e per'or#ed on 'or#ula 8elds C. &ollKup cannot be performed on formula Delds that use crossKobject reference or onKtheK yKcalcula:on such as Sow!. Ans ! . &oll up summary can be performed on formulate Delds but if their formulate contains an `error results+ it may aect the summary. Ans !
1"8.
#hich two >ueries can a developer use in a visualforce controller to protect against *NOL
injec:on 'ulnerabili:es? Choose " answers A. *tring >rySame / ;^< 3 *tring.enforce*ecurityChecsname!3 ;^<0 *tring >ry*tring / ;*9L9C7 d &N( Contact #H9&9 Same LP9 U>rySAme<0 List)Contact, >uery&esults / atabase.>uery>ry*tring!0 Ans ! . String r,Ia#e C V ^ na#eVG String r,String C S"L"*$ 5d JR:M *ontact /"R" Ia#e L5b" ? r,IA#eG List*ontact! uer,Results C Data%ase.uer,6r,String7G C. *tring >rySame / ;^< 3 *tring.escpae*ingleOuotesname!3 ;^<0 *tring >ry*tring / ;*9L9C7 d &N( Contact #H9&9 Same LP9 U>rySAme<0 List)Contact, >uery&esults / atabase.>uery>ry*tring!0 Ans ! . String r,String C S"L"*$ 5d JR:M *ontact /"R" Ia#e L5b" ? r,IA#eG List*ontact! uer,Results C Data%ase.uer,6r,String7G
&efU h3ps?@@de-eloper.sales'orce.co#@[email protected]; us.pages.#eta@pages@pagessecurit,pssolinjecon.ht#
1"=.
A sales manager wants to mae sure that whenever an opportunity stage is changed to
FClosed #on+G a new case will be created for the support team to collect necessary informa:on from the customers. How should a developer accomplish this? A. . C. . 1"B.
Create a process builder to create the new cases. Ans ! Set up a -alidaon rule on the opportunit, stage *reate a loo0up 8eld to the case o%ject on the opportunit, o%ject. *reate a &or0o& rule. A developer needs to write a method that searches for a phone number that could be on
mul:ple object types. #hich method should the developer use to accomplish this tas? A. . C. . 1".
S:QL Quer, that includes ALL R:/S S:QL uer, on each o%ject *N*L Ouery that includes ALL &N#* Ans ! S:SL uer, on each o%ject
#hich two are two regarding Apache PaQa on Herou? Choose " answers A. . C. .
1"I.
s a messaging bacbone for building distributed applica:ons Ans ! 5s an add;on that creates a long ter# data store s a distributed commit log for communica:on between services Ans ! 5s designed to #o-e s#all -olu#e o' ephe#eral data #hat does the context variable 7rigger.old represent in an update opera:on?
A. . C. .
1"J.
$he sa#e -alues o' $rigger.ne& $he current -alues o' the records 8ring the trigger 7he previous version values of the records Dring the trigger Ans ! A #ap o' 5Ds to the :ld -ersion o' the records
A developer is ased to write nega:ve tests as part of the unit tes:ng for a method that
calculates a person
1-5.
$hro&ing a custo# e+cepon in the unit test. Assert that a null is accepted %, the #ethod. Assert that past dates are accepted %, the #ethod. Assert that future dates are rejected by the method. AS*!
A developer created a Lightning component to display a short text summary for an object
and wants to use it with mul:ple Apex classes.
How should the developer design the Apex classes? A. a-e each class i#ple#ent an inter'ace that de8nes #ethod get$e+tSu##ar,67 that returns the su##ar,. B. a-e each class de8ne #ethod get$e+tSu##ar,67 that returns the su##ar,. *. a-e each class de8ne #ethod get:%ject67 that returns the s:%ject that returns the s:%ject that 5s controlled %, the Ape+ class. D. 9xtend each class from the same base class that has a method get*ummary! that returns
the summary. Ans !
1-1.
%C wants to automate the sales opera:ons process for closed won oppo. #hen an opp is
mared as closed won+ %C wants to update the account to mar it as customer. n addi:on+ %C wants all of the opp line items from closed won opp to be automa:cally added to assets. A. /or0o& rules B. Process %uilder *. /or0o& rules and process %uilder D. $rocess builder with an auto launched ow Ans !
1-".
#hat is the ey di between masterKdetail and looup rela:onship? A. /hen a record o' #aster o%ject in a loo0 up relaonship is deleted> the detail records are also deleted. . /hen a record o' #aster o%ject in a loo0 up relaonship is deleted > the detail records are not deleted C. Loo0up 8elds are reuired 8eld on an o%ject . A master detail rela:onship detail record inherits the sharing and security of its master
record. Ans ! Re' ?h3ps?@@de-eloper.sales'orce.co#@[email protected];us.api.#eta@api@relaonshipsa#ongo%jects.ht#
1--.
7hree char of sta:c methods? *hoose
A. . C. . 9.
ni:aliRed only when a class is loaded Ans ! A stac -aria%le is a-aila%le outside the scope o' the ape+ transacon Allowed only in outer classes Ans ! Allo&ed onl, in inner classes 9xcluded from the view state of a ' page Ans !
Re' ?h3ps?@@de-eloper.sales'orce.co#@[email protected];us.ape+code.#eta@ape+code@ape+classesstac.ht#
1-8.
A developer wants to override a buon using ' on an object
#hat is the re>uirement? A. $he o%ject record #ust %e instanated in a controller or e+tension . 7he standard controller aribute must be set to the object Ans !
C. $he acon a3ri%ute #ust %e set to a controller #ethod . $he *ontroller or e+tension #ust ha-e a page re'erence #ethod. Re' ?h3ps?@@de-eloper.sales'orce.co#@[email protected]; us.pages.#eta@pages@pagescontrollercusto#iOeo-erride.ht#
1-=. A visual orce page uses contact standard controller How can a developer display the name from the parent account record on the page? A. . C. .
%se 2 Zcontact.Account.name4 merge Deld syntax Ans ! se S:QL s,nta+ to 8nd the related accounts Ia#e 8eld. se addional ape+ logic &ithin the controller to uer, 'or the na#e 8eld se an addional standard controller 'or Accounts.
Re'? h3ps?@@success.sales'orce.co#@ans&ersUidC\)H)))))))gu"$AA h3ps?@@de-eloper.sales'orce.co#@'oru#s@UidC\)HJ)))))))\\No5AA
1-B.
%niversal containers re>uire service representa:ve to update all cases at least once every
three days. 7o mae sure the policy is obeyed+ a developer has been ased to implement a Deld that displays the number of days since the last case update. #hat should developer conDgure? A. . C. .
1-.
/or0o& rule ormula Deld Ans ! Process %uilder Scheduled ape+ class
A developer wrote a worow email alert on case crea:on so that an email is sent to the
case owner manager when a case is created. #hen will the email be sent? A.
A9er *o##i
B. Be'ore $rigger e+ecuon co#pleted. *. A9er $rigger e+ecuon co#pleted. D. Be'ore *o##i
1-J. %sing which annota:on test classes can run in parallel? A. Eis$est6runParallelCtrue7 B. Eis$est6seealldataC'alse7 *. Eis$est6isParallelrunCtrue7 D. Eis$est6isParallelCtrue7
1N). #hat is a good prac:ce for a developer to follow when wri:ng a trigger? Choose " answers. A. sing the Map data structure to hold uer, results %, 5D. B. sing E'uture #ethods to per'or# DML operaons. *. sing the set data structure to ensure disnct records. D. sing as,nchronous callouts to call e+ternal s,ste#s. 1N1. #hich code bloc returns the List'iew of an Account object using the following debug statement? s,ste#.de%ug6controller.getListie&:pons677G A. Ape+Pages.StandardSet*ontroller controller C ne& Ape+Pages.StandardSet*ontroller6[ S"L"*$ 5d 'ro# Account L5M5$ 1]7G B. Ape+Pages.Standard*ontroller controller C ne& Ape+Pages.Standard*ontroller6Data%ase.uer,Locator6S"L"*$ 5d 'ro# Account L5M5$ 177G *. Ape+Pages.Standard*ontroller controller C ne& Ape+Pages.Standard*ontroller6[ S"L"*$ 5d 'ro# Account L5M5$ 1]7G D. Ape+Pages.StandardSet*ontroller controller C ne& Ape+Pages.StandardSet*ontroller6Data%ase.uer,Locator6S"L"*$ 5d 'ro# Account L5M5$ 177G 18". or what purpose apexUac:on poller will be used? A. $o call controller #ethod 'ro# _a-ascript B.A #er sending an A_AX reuest to the ser-er *.$i#er to re'resh client side page according to a #e inter-al D.$o Render isual'orce as PDJ.
18-. #ith new release what is the maximum siRe of view state in visualforce? A.1FFbB B.1NFbB *.Io chang.1F bB D.(()bB
188. #hich data type of collec:on of data types can *NOL statements populate or evaluate to? Choose answers. A. A Boolean B. An 5nteger *. A list o' s:%jects D. A single s:%ject ". A String