SalesForce Certification Preparation Lab#1

24
Getting Started with SalesForce CRM Implementing Business Process in SALESFORCE Part 1 Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginner’s Gide !or Sales"orce. The docment !ocses on Sales"orce #eveloper $erti!ication Hands-%n Gide &ab'(.  )oin or pro!essional training program and learn !rom e*perts. History: ersion Description C!ange Aut!or Pu"lis! Date #$1 Initial Dra%t C!an&ra Pra'as! S!arma 1# t!  (an )#1* #$1 Re+ie,-1 Amit S!arma 1# t!  (an )#1* www.bispsoltions.com www.bisptrainigs.com www.h+periongr.com Page (

Transcript of SalesForce Certification Preparation Lab#1

Page 1: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 1/24

Getting Started with SalesForce CRM

Implementing Business Process in SALESFORCE

Part 1

Description:BISP is committed to provide BEST learning material to the beginners and

advance learners. In the same series, we have prepared a complete end-to

end Hands-on Beginner’s Gide !or Sales"orce. The docment !ocses on

Sales"orce #eveloper $erti!ication Hands-%n Gide &ab'(. )oin or

pro!essional training program and learn !rom e*perts.

History:ersion Description C!ange Aut!or Pu"lis! Date#$1 Initial Dra%t C!an&ra Pra'as! S!arma 1#t! (an )#1*#$1 Re+ie,-1 Amit S!arma 1#t! (an )#1*

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (

Page 2: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 2/24

Contents$ontents..........................................................................................................................

loop .........................................................................................................................../

0EGE120eglar E*pression3............................................................................................./

IS$H45GE# .....................................................................................................................6

IS5E7.............................................................................................................................. 8

P0I%04&9E ................................................................................................................... :

parallel approval processes.............................................................................................:

#+namic 4pproval Process sing 4pe* and Trigger in Sales"orce ...............................(;

%tbond <essages as part o! an approval process ....................................................(/

4pproval Process 7ith $ross-%b=ect "ormlas ..............................................................(8

7hat are $ross-%b=ect "ormlas>...........................................................................(8

0ecord data changes.....................................................................................................(:

$reate 4pproval Process.............................................................................................(:

alidation 0les To En!orce $onditional re?ired Behavior...........................................

#ata "ormat ................................................................................................................../

4to 5mber @ ......................................................................................................../$hecbo* @.............................................................................................................../

$rrenc+ @................................................................................................................ /

#ate @......................................................................................................................./

5mber @................................................................................................................. 6

#ata consistenc+ @......................................................................................................... 6

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page

Page 3: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 3/24

loo'up&%%A9P23 is a !nction it sed in validation, &%%A9P "nction Similar to its E*cel

conterpart, the &%%A9P !nction lets +o se data in another ob=ect as a basis !or

validation.

4dd a alidation 0le on the Emplo+ee which checs whether there are an+ e*isting

Emplo+ee records with the same name i! so stop the 9ser !rom saving it. Here comes

the role o! &%%A9P.

 - $rrentl+ Sales"orce ses loop !or validations.

 - &%%A9P can onl+ be done on the 5ame !ields.

 - The !ieldtoretrn mst be an ato nmber, roll-p smmar+, loop relationship,

master-detail relationship, checbo*, date, dateCtime, email, nmber,

percent, phone, piclist, te*t, te*t area, or 90& !ield t+pe.

 - The !ieldonloopob=ect mst be the 0ecord 5ame !ield on a cstom ob=ect.

 - The !ieldonloopob=ect and loopvale mst be the same data t+pe.

RE.E/0Regular Epression2Regex is a regular expression it provide validation. A regular expression (regex) is a special text string for

describing a search pattern in SalesForce. You are probably familiar with wildcard notations such as . or .txt to

find all text files in a file manager. !he regex e"uivalent is .*\.txt$.

#haracter  Meaning

$ assert end of string (or line$ in multiline mode)

 / general escape character with several uses

^ assert start of string or line$ in multiline mode

. match any character except newline

[ start character class definition

] %nd character class definition

| start of alternative branch

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page /

Page 4: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 4/24

( start sub pattern

) end sub pattern

? extends the meaning of $ or &' "uantifier$ or "uantifier

minimie

* & or more "uantifier 

+ or more "uantifier$ also *possessive "uantifier*

{ start min'max "uantifier 

Here the code !or <atching String to Email pattern In Sales"orce

pblic static Boolean checEmail"ormat2String regemail3 D

  String rege*emali Fa-4-;-JKK.KKLKK'KKMKKNKKOKKKKCKKKK>KKQKKKKRKK-KKKK

DKKKKUKKVKF.NR-WRXa-4-;-JKK-.-WRKK.a-4-WRFY

  Pattern <+Pattern Pattern.compile2rege*emali3Y

  <atcher <+<atcher <+Pattern.matcher2reegemail3Y

  Boolean reslt <+<atcher.matches23Y

  retrn resltY

  U

ISCHA3.ED

ISB&45A2E*pression3 chec whatever an e*pression an retrn T09E or "4&SE.

Function Description 4seISCHA3.ED $ompares the vale o! a !ield

to theprevios vale and retrns

 T09E i! thevales are di!!erent. I! thevales are the

same, this !nction retrns"4&SE.

IS$H45GE#2field 3 and replacefield

with the name o! the !ield +owant tocompare.

ali&ation Rule Eample: The !ollowing validation rle prevents sers !rom changing

an ob=ect name a!ter it has been created@ NOT(ISCHANGED(Name))

NOT(AND(ISCHANGED(Priority), ISPICKVAL(Priority, “Low”))) is a validation rle

that ensres i! a ser changes the Priorit+ o! a case, the new priorit+ cannot be Z&ow.[NOT(AND(ISCHANGED(CloeDate), O!("ONTH(CloeDate) #$ "ONTH(TODA%()),

%EA!(CloeDate) #$ %EA!(TODA%())),&Pro'ileName #$ IT "a*a+er)) is a

validation rle that prevents a ser !rom changing the $lose #ate o! an opportnit+ to

a date otside o! the crrent month and +ear nless that ser has the ZIT <anager[pro!ile.

E*ample @- i! +o want an+ costme ob=ect close date !ield shold not blan +o can go

Step \ Create \ O"5ects \ Select costume o"5ect then !ind ali&ation Rules and

clic on 3e, btton a!ter the +o can write !ormla. then save it.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page 6

Page 5: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 5/24

IS3E6$hecs i! the !ormla is rnning dring the creation o! a new record and retrns T09E i!

it is. I! an e*isting record is being pdated, this !nction retrns "4&SE.

ali&ation Rule Eample:

9se the !ollowing validation rle to prevent sers !rom creating a record with a close

date in the past. 45# 2IS5E723, $lose#ate ] T%#4^233 checs i! the ser is creating a

new opportnit+ and, i! so, ensres that the $lose #ate is toda+ or a!ter toda+.9se this validation rle to ensre sers add at least one prodct to an opportnit+ a!ter

the+ have created it.

5%T2%02IS5E723,Has%pportnit+&ineItem33

In this e*ample, the validation rle !ormla displa+s the !ollowing error message when

an e*isting opportnit+ does not have an+ prodcts@ _^o mst add prodcts to this

opportnit+ be!ore saving._ This does not displa+ an error on the initial save becase

the+ cannot add prodcts ntil a!ter saving the record initiall+Y bt it prevents them

!rom resaving or closing an opportnit+ that does not contain prodcts.

E*ample @- There is +o can chec is close date not less then to Toda+ date.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page 8

Page 6: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 6/24

PRIORAL4E

Function Description 4sePRIORAL4E 0etrns the previos vale o!

a !ield.

P0I%04&9E2field 3

ali&ation Rule Eample:

 The !ollowing validation rle prevents sers !rom changing the e*pected revene o! an

opportnit+ a!ter it is closed@ 45#2P0I%04&9E2<in pa+3 \ <in pa+, Is$losed3.

parallel appro+al processes"or $reate Parallel 4pproval Processes !irst $reate costme ob=ect 2E* @ Empl+ee3 then

in costme create #rop down 2Piclist 3 !ield and give an+ name then add the +alues

0I7 8anager9 HR 8anager an& Sales 8anager9 I7 8anager HR 8anager9 I7

8anager Sales 8anager9 HR 8anager Sales 8anager 9 I7 8anager HR

8anager +alues Sales 8anager2

 Eample: Entry criteria:; ISPIC<AL0Select ==c9>I7 8anager>2Appro+al only to I7 manager$2

 ^o can see below

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page :

Page 7: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 7/24

For Create Appro+al Process :

Setup \ Create \ 6or'%lo, appro+als \ Appro+al Processes 

Step 1 :; !ill all !ields and clic 3et btton.

Step ) :;

Select "ormla evalates to tre in drop down !ield then write !ormla

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page `

Page 8: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 8/24

Step * :;

Step ? :;

Select 5oti!ication Templates and clic on 5e*t btton.

Step @ :; Select "ields to #ispla+ on 4pproval Page &a+ot and clic to 5e*t btton.

Step :;

 Then $lic on Save btton.

4!ter Then 4ssigned 4pprover Process .

Step 1 :;

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page

Page 9: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 9/24

Step ) :;

Step * :; Select 4tomaticall+ 4ssign then clic on Save btton.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page J

Page 10: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 10/24

Dynamic Appro+al Process using Ape an& 7rigger in

SalesForce#+namic approval process is sed to rote approval re?ests to ser listed in loop

!ields on the record

re?iring approval.

4pproval Process, one emplo+ee re?est is approved or re=ected is based on his

decision.

bt there are 6 or 8 emplo+ee wait !or same process So in this scenario approval

process de!alt it give d+namic approval.

(- 4tomaticall+ sbmit the record !or approval on the basis o! !ield vale.

- 4tomaticall+ select the ne*t 4pprover.

/- 4pprove C 0e=ect the record on the basis o! !ield

&ynamic su"mit t!e appro+al process using trigger :

pblic void d+namic4pproval2Empl+ees emp3

  D

  CC $reate an approval re?est !or the Empl+ees  4pproval.ProcessSbmit0e?est re? new 4pproval.ProcessSbmit0e?est23Y

  re?.set$omments2FSbmitting re?estF3Y

  re?.set%b=ectId2emp.id3Y

  re?.set5e*t4pproverIds2new IdW Demp.5ew4pprovercU3Y

  CC Sbmit the approval re?est !or the Empl+ees

  4pproval.Process0eslt reslt 4pproval.process2re?3Y

  U

Belo, met!o& is use& to &ynamic appro+e t!e process using trigger$

  pblic void approve5ew2Empl+ees emp3

  D

  4pproval.Process7oritemre?est re? new

4pproval.Process7oritemre?est23Y

  re?.set$omments2F4pproving re?est sing TriggerF3Y

  re?.set4ction2F4pproveF3Y

  re?.set5e*t4pproverIds2new IdW Demp.5ew4pprovercU3Y

  Id EmpI# getEmpI#2emp.id3Y

  i!2EmpI# nll3

  D  emp.addError2FErrorF3Y

  U

  else

  D

  re?.setEmpI#2EmpI#3Y

  4pproval.Process0eslt reslt 4pproval.process2re?3Y

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (;

Page 11: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 11/24

  U

  U

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page ((

Page 12: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 12/24

Fiel& !istory trac'ing to au&it processes :

Fiel& !istory trac'ing :

"ield histor+ tracing allows +o to save all data when the vales create new !ields and

pdate vale etc.

go to Setup \ Create \ O"5ects \ Select an+ costume o"5ect and Custom Fiel&s

Relations!ips and clic on Set History trac'ing then set Tracing.

Au&it Processes :

Setup  \ Security Controls \ ie, Setup Au&io 7rail

 The setp adit trail histor+ shows +o the ; most recent setp changes made to +or

organiation. +o can download .$S !ile.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (

Page 13: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 13/24

Out"oun& 8essages as part o% an appro+al process4n otbond message is a wor!low, approval, or milestone. 4n otbond message

sends the data in the speci!ied !ields in the !orm o! a S%4P message to the endpoint.

or

%tbond <essages are S%4P transactions that sales!orce.com atomaticall+ sends to

e*ternal s+stems when triggered.

Ho, to Create Out"oun& 8essages :

Setup \ Create \ 6or'%lo, Appro+als \ Out"oun& 8essages

Step 1 :;

Step ) :;

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (/

Page 14: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 14/24

Step *:;

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (6

Page 15: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 15/24

Appro+al Process 6it! Cross;O"5ect Formulas

6!at are Cross;O"5ect Formulas

Cross-object formulas are !ormlas that span two related ob=ects and re!erence merge!ields on those ob=ects. $ross-ob=ect !ormlas can re!erence merge !ields !rom a master

2Zparent[3 ob=ect i! an ob=ect is on the detail side o! a master-detail relationship.

Setp \ $reate \ 7or!low O 4pprovals \ 4pproval Processes then select cstom

ob=ect name and adn write the code.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (8

Page 16: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 16/24

Recor& &ata c!angesi! need to changes record data there is two wa+ !irst is direct on Sales"orce.com in

#ata Import 7iard.

second is b+ sing #ata &oader.

 "or instance need !ile shold loo lie as the e*emplar below@

 (. %ne colmn shold be called FI#F and it is a list o! all the records FI#sF.

 . Second colmn shold be called F%75E0I#F and it is a list o! all the sers I#s.

B+ sing #ata &oader +o can pload this and change 0ecord data changes. +o need

to id and ownerid the write data lie a 5ame, $it+ etc.

Implement multi;step appro+al ,or'%lo,s an&

escalations to automate "usiness processesBusiness Reuirement :

we want create record Implement mlti-step approval wor!lows.

rles !or approval process below @-

- 4ll new recorded that are above ( atomaticall+ enter the process.

- !irst Step have sbmit manager approve or re=ect.

- i! re=ect, email goes to the sbmitter manager and the record is !lagged as _re=ected_.

- i! approved the ne*t approval stage is entered.

i! the credit recorded is greater than 6;; then the approval goes p management

- i! not then !inal step approvalC re=ection.

Create Appro+al Process

Setup \ create \ 6or'%lo,s appro+als \ Appro+al Processes

 Then select the costme ob=ect

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (:

Page 17: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 17/24

Step 1 :;

Enter Process name or #escription then clic on ne*t btton.

Step ) :; Select approval process and clic to ne*t btton.

Step * :;

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (`

Page 18: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 18/24

Step ? :; Select Email template and clic on 3et btton.

Step @ :; Select "ields to #ispla+ on 4pproval Page &a+ot then clic on 3et btton.

Step :; select Speci!+ Initial Sbmitters and clic on Sa+e btton.

4!ter then 4pproval process , select ^es, IFd lie to create approval step now. clic on

Go btton.

Step 1 :;

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (

Page 19: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 19/24

Step ):;

Step * :; Select option and clic on Sa+e btton.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (J

Page 20: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 20/24

Create an approval action for ti! !tep "Step 1 :;

Step ):;

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page ;

Page 21: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 21/24

4!ter then select other approval and !inish.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page (

Page 22: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 22/24

ali&ation Rules 7o En%orce Con&itional reuire&

Be!a+ior"or $reating alidation rles clic on Setup \ Create \ O"5ects \ select an+ ob=ect

name then !ind alidation 0le then $lic on 3e, btton.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page

Page 23: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 23/24

Data Format

Auto 3um"er :

4 #ispla+ "ormat allows +o to control the appearance o! the 4to 5mber !ield. 4

#ispla+ "ormat consists o! the sbstittion variables described below, pls an+ other

characters +o wish to inclde as a pre!i* or s!!i*.

C!ec'"o :

4llows sers to select a Tre 2checed3 or "alse 2ncheced3 vale. checbo* retrn

vale onl+ 2Tre C "alse 3.

Currency :

Please enter the length o! the nmber and the nmber o! decimal places. "or e*ample

a nmber with a length o! ` and 6 decimal places can accept vales p to

_`68(8.86_.

In Ape :

]ape*@ otptTe*t vale_string@ D;,nmber,M','''.''U_\

]ape*@ param vale_DLan+nmberU_ C\

]Cape*@otptTe*t\

Date :

E*ample @

]ape*@otptTe*t vale_D;, date, ddFCF<<FCF++++ HH@mm@ssU \

  ]ape*@param vale_DL )ob4pplications.End#ateTimecU_\

]Cape*@param\

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page /

Page 24: SalesForce Certification Preparation Lab#1

8/13/2019 SalesForce Certification Preparation Lab#1

http://slidepdf.com/reader/full/salesforce-certification-preparation-lab1 24/24

3um"er :

Please enter the length o! the nmber and the nmber o! decimal places. "or e*ample

a nmber with a length o! 8 and decimal places can accept vales p to _68(8.6_.

Eample :

]ape*@page standard$ontroller_4ccont_\

]ape*@otptTe*t vale_D;, nmber, ;;;,;;.;;U_\  ]ape*@param vale_DL4ccont.<a*SalU_ C\

 ]Cape*@otptTe*t\

]Cape*@page\

Data consistency :#ata $onsistenc+ means that each ser sees a consistent view o! the data, inclding

visible changes made b+ the serFs own transactions and transactions o! other sers.

 - Eliminate #plicate #ata 4tomaticall+.

 - $leanse, Standardise and $onsolidate +or data.

 - $reate a Single Trsted iew o! +or $stomers.

 - Integrate Important #ata !rom 4ll o! +or S+stems.

 - Generate 4ccrate and $omplete 0eports.

www.bispsoltions.com  www.bisptrainigs.com  www.h+periongr.com Page 6