Professional Documents
Culture Documents
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 Beginners G ide !or Sales"orce. The doc ment !oc ses on #pe$ and %is al"orce code basics. #lso, we tal& abo t develop on-demand b siness applications. 'oin o r pro!essional training program and learn !rom e$perts.
History:
Version 0.1 0.1 Description Change Author nitial Dra!t Chandra Pra"ash #har$a 'e(ie)*1 A$it #har$a Publish Date 10th Aug %01& 10th Aug %01&
www.bisptrainigs.com
www.h(periong r .com
Contents
*ontents.......................................................................................................................... + #pe$ classes in Sales"orce............................................................................................. , +. -ptional de!inition modi!iers .s ch as virt al, abstract, and so on/.........................., ,. 0e1 ired 2 The &e(word class !ollowed b( the name o! the class............................., 3. -ptional e$tensions 2................................................................................................ , How to #dd an #pe$ *lass2........................................................................................... , #pe$ Triggers in Sales"orce............................................................................................. 4 Triggers 2................................................................................................................... 4 How to write Trigger in Sales"orce.com 2..................................................................5 How 6o %is al"orce Pages *ompare to S-*ontrols7........................................................8 *reating a %is al"orce *omponent..................................................................................8 9hat are * stom *omponents 2................................................................................8 :sing * stom *omponents in a %is al"orce Page2..................................................); How to 6e!ining * stom *omponents 2...................................................................); 9hat is %is al"orce.................................................................................................... )) 9h( se %is al"orce 2............................................................................................. )+ How To *reate %is al"orce Page ............................................................................ )+ ............................................................................................................................... )3 :sing the %is al"orce *omponent <ibrar( ....................................................................)3 -verriding an E$isting Page with a %is al"orce Page....................................................)4 0edirecting to a Standard -b=ect <ist Page...................................................................)> :sing Inp t *omponents in a Page................................................................................ )?
www.bisptrainigs.com
www.h(periong r .com
www.bisptrainigs.com
www.h(periong r .com
"or create new #pe$ code clic& on Dew b tton . *lic& on ,e) b tton, #!ter that open new web page on this page #pe$ *ode editor is available. (o can see below. write here #pe$ *lass a!ter then clic& on #a(e b tton.
www.bisptrainigs.com
www.h(periong r .com
#chedule Apex : Sched le an #pe$ class that implements the JSched lableJ
inter!ace to be a tomaticall( e$ec ted on a wee&l( or monthl( interval. *lic& on #chedule Apex b tton.
0sage 0et rns tr e i! this trigger was !ired d e to an insert operation, !rom the Sales"orces ser inter!ace, #pe$, or the #PI. 0et rns tr e i! this trigger was !ired d e to an pdate operation, !rom the Sales"orce ser inter!ace, #pe$, or the #PI. 0et rns tr e i! the c rrent conte$t !or the #pe$ code is a trigger, not a %is al"orce page, a 9eb service, or an e$ec teanon(mo s./ #PI call. 0et rns tr e i! this trigger was !ired d e to an delete operation, !rom the Sales"orce ser inter!ace, #pe$, or the #PI. 0et rns tr e i! this trigger was !ired be!ore an( record was saved. 0et rns tr e i! this trigger was !ired a!ter all records were saved. 0et rns tr e i! this trigger was !ired a!ter a record is recovered !rom the 0ec(cle Bin .that is, a!ter an ndelete operation !rom the Sales"orce ser inter!ace, #pe$, or the #PI./ 0et rns a list o! the new versions o! the s-b=ect records. # map o! I6s to the new versions o! the s-b=ect records. 0et rns a list o! the old versions o! the s-b=ect records. # map o! I6s to the old versions o! the s-b=ect records. The total n mber o! records in a trigger invocation, both old and new.
www.bisptrainigs.com
www.h(periong r .com
#!ter that open pop p window in this window, 9rite Trigger name and select -b=ect class .which (o need to bind with trigger/ then clic& on s bmit b tton. Then (o can see new page !or write new trigger.
#!ter 9rite trigger , go to File men and clic& on #a(e see below . also (o se C/'. 1 # b( sing &e(board. ,ote : "or nderstanding #pe$ *lasses or #pe$ Trigger (o can see here. E$ample , see below .
2xa$ple : 9rite ape$ code !or a tomaticall( increasing +L on the s bmit !ees !or ever( st dent. #tep 1 : *reate an( c stom ob=ect tab. "or E$ 2 *ollege (o can see below.
www.bisptrainigs.com
www.h(periong r .com
#tep % : #!ter then go to adding #pe$ code, #etup H De(eloper H Apex classes+ clic& on ,e) b tton. then write here #pe$ code.
#tep & : #!ter write #pe$ classes , 9rite #pe$ Trigger *lic& on Apex /rigger !or write #pe$ Trigger.
www.bisptrainigs.com
www.h(periong r .com
www.bisptrainigs.com
www.h(periong r .com
2xa$ple, I! (o want to create a Emplo(ee list sing %is al"orce pages. Each Emplo(ee record in the list has its own border. 0ather than repeating the %is al"orce mar& p re1 ired !or displa(ing ever( Emplo(ee record in the list. -nce de!ined, standard components s ch as Mape$2related<istH or Mape$2dataTableH .
#tep 1 : Enter <abel Dame then write %is al"orce *omponent a!ter then clic& on #a(e b tton.
www.bisptrainigs.com
www.h(periong r .com
#tep % : #!ter that create new %is al"orce page and write here some cod (o can see below.
What is VisualForce
%is al"orce is !ramewor& that allows developers to b ild re!ined, c stom ser inter!aces that can be hosted nativel( on the "orce.com plat!orm. The %is al"orce !ramewor& incl des a tag-based mar& p lang age, similar to HTK<. In %is al"orce page (o can se html code, 'avaScript, *SS, #=a$, "lesh. 6evelopers can se %is al"orce to create a %is al"orce page de!inition. # page de!inition consists o! two primar( elements2 - %is al"orce mar& p. - # %is al"orce controller. VisualForce 6ar"up :4 %is al"orce mar& p consists o! %is al"orce tags, HTK<, 'avaScript, or an( other 9ebenabled code embedded within a single <apex: page> tag. The mar& p de!ines the ser inter!ace components that sho ld be incl ded on the page, and the wa( the( sho ld appear. VisualForce Control :4 # %is al"orce controller is a set o! instr ctions that speci!( what happens when a ser interacts with the components speci!ied in associated %is al"orce mar& p, s ch as when a ser clic&s a b tton or lin&.
www.bisptrainigs.com
www.h(periong r .com
www.bisptrainigs.com
www.h(periong r .com
#tep 1 :
#!ter Saving this page. clic& on this icon to view Home page.
I! (o are getting error !or view page, solve this problem b( !ollowing some steps.Given below. www.bispsol tions.com Page ), www.bisptrainigs.com www.h(periong r .com
*lic& on #etup H 6anage 0sers H 0sers then clic& on Edit lin& b tton !or edit ser settings.
Then (o can !ind 6evelopment Kode and chec&ed chec& bo$ then clic& on save b tton. #!ter then (o can clic& on view icon that time, there is %is al"orce to as& (o to create new page beca se this page is open in development mode.
#econd type o! create VisualForce page : go to web browser t(pe :0 <, (o can see below. E$ 2 Http2FF Sales"orce lin& a!ter loginFape$FPage Dame
9hen (o clic& on *omponent 0e!erence lin& (o can see new web page. -n this web page all *omponent with s(nta$ are available, which *omponent (o want to add ' st write in code window. see below. #nd also see how to se !ra$e in VisualForce page .
+. *reate -verriding page. ,. 6elete E$isting code. and paste it below code. 3. See below code.
www.bisptrainigs.com
www.h(periong r .com
www.bisptrainigs.com
www.h(periong r .com
#!ter *lic& on this b tton (o can see page redirect #cco nt page. (o can see below.
www.bisptrainigs.com
www.h(periong r .com
www.bisptrainigs.com
www.h(periong r .com