100% found this document useful (3 votes)
3K views524 pages

Platform Developer I Salesforce Handwritten Notes

Platform Developer 1 Salesforce

Uploaded by

vrupatel02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (3 votes)
3K views524 pages

Platform Developer I Salesforce Handwritten Notes

Platform Developer 1 Salesforce

Uploaded by

vrupatel02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 524
ings Devecnne am No 1 Training Institute for go sale SSOLCE “tite (With OOPS Concepts) Apex Jquery Advance Apex Ajax Visual Force Schema Programming Deployment Real Time Scenarios INDEX S.NO TOPIC NAME PAGE NO e 1, When Should I Use Apex os 1 2. How Does Apex Work ¢ Sv 2 Object Oriented Programming (Oops) « { > 3. Data Types 4, Class & 5 5. Access Modifiers S 6. Class Variables we 8 7. Object S 9 8. Constructors i 10 9. Usage of Abax Brigram With in i “ rage : CRS for Getter Method 13 12. Apex Class to Demonstrate Setter Method 4 13. Call Apex Methods in A VF Page 15 14, Simple Apex Class 16 15. Array 7 Shyamala Plaza, Opp. Annapurna Block Behind Huda Maitrivanam Ameerpet,Hyderabad-16 040-66028688, +91 86 86 86 42 86. wwonw.capitalinfosol.com [email protected] APICAL info vesforce.con SOLUTIONS 16. Pick List Using Select Option from Apex 18 17. Collection * List 20 © Set 24 * Map 27 18. SOQL Queries 32 19. Child to Parent Relationship On Standard, Custom Objects “40 20. Example Program 41 21. Parent to Child Relationship On Standard, Custom Objects 4B 22.SOSL Queries 46 23. Email Progragmin 49 © OuibountiemaPSeRice 50 * PDI coed? 54 . ph Email Sérvice 58 1 62 25. Interface 67 26, Interface Iterable 70 21. Database. QueryLocator Class Rn 28, Batch Apex B * Start Method + Execute Method + Finish Method 29. Invoking Of Batch Apex Job B ‘Shyamaia Plaza, Opp. Annapurna Block Behind Huda Maitrivanam AmeerpetHyderabad-16 (040-66028688, +91 86 86.86 42 86. wow canitalinfosol.com [email protected] Capital info SOLUTIONS 30. Order Of Execution Of Batch Apex Job 31. Database.Statefil 32. Governing Limits,Limitations 33. Apex Scheduler ¢ 34, Real Time use cases for Batch, Schedule Apex 7 “> 34, Testing 5, 35. Batch Apex Example With Test Case €. Sb SS) io) 36. Schedule Apex Example With Test Cosy 37. Triggers & Examples S 38. Invokong Apex methods in Tale 39.Recursive Triggers < Os o 40. Order of Execution autre 41, Future Annotativa’.: 42. Apex Sharihgakiules: 2 43, Flowsligituction eC ~ ‘cess.Plugin Interface yy Input parameters x WS Output Parameters cm Plug in Program 45, Select Option 46, Schema Programming 47. JSON(JavaScript Object Notation) 48. http Callouts 49, JQUERY wr) 81 83 84 89 100 106 107 109 124 127 131 139 142 146 150 154 156 167, 180 183 ‘Shyamala Plaza, Opp. Annapurna Block Behind Huda Maitrivanam Ameerpet,Hyderabad-16 (040-66028688, +91 86 86 86 42 86, wonw.capitalinfosol.com [email protected] Capital info SOLUTIONS 50. Introduction to VisualForce Page 189 51. Apex Components 190 * Apex Page * Formula & Expressions in VF Apex PageBlock Formula Expressions PageBlock Section * PageBlock Buttons e * Command Button * Command Link PageBlock Section Item 52. ApexInput Components 197 © Input Text © Input Secret * Input Hidgen ge», © Input Checkbox * Input Te: Select Li 53, Java Script in VF Page 205 «Introduction to Java Script © Arrays in Java Script * Methods in Java Script «Reading Sobject data in Java Script «Reading VF input component data in Java Script © Validations in Java Script 54, Page Block Table 217 Shyamala Plaza, Opp. Annapuma Block Behind Huda Maitrivanam Ameerpet,Hyderabad-16 (040-66028688, 191 86 86 86 42 86, wonow.capitatinfosol.com, [email protected] Capita! info 6 SOLUTIONS 55. Data Table 223 56, Data List 204 57.Apex Tab 226 58. Insert & Include 229 59. VF Page in PDF Format ps c 60. Action function, Action Region, Action Support . 38 61. Real Time Scenarios ¢ 2 62. Reports & Dashboards in VF 249 63..Google Maps in Salesforce 256 64. CSS 261 0 65. Remote Method invocation Java Sefipt, 270 ON Shyamala Plaza, Opp. Annapurna Block Behind Huda Maitrivanam Ameerpet,tiyderabad-16 (040-66028688, +91 86 86 86.42 86. www.capitalinfosol.com [email protected] CAPITAL INFO SOLUTIONS Shymala plaza, Behind HUDA Maitrivanam, Ameerpet, Hyderabad, 8686864286, 040-66028688. Emaii:[email protected] www.capitalinfosol.com “Only Capital Info Solutions Students Can Answer These Questions” SALESFORCEcrm InrerviewQuestions BySatishMyla 1) Visualforce Basic Questions By ‘What is view state in visual force ? Which api used to design-visual force page? What is the difference between actionSupport and actionFunetion What is the actionRegion? What is difference between insert and include? How do you use static resource in VF page? ‘What is remote action? How many records wean print a pageBlock 9. What is the difference between related List enhanced List detail 10. What is the difference between controller and extension? 11, What is Ajax? Have you used it if so tell the scenario ? 12, What is Jquery ? Where you have used ? 13, What is S-Controls ? 14, What is the use Static Resource in Visual force? 15, Can I pass parameters from VF page to apex method? 16. How do you refer to current page id 17. Tell me something SAction ea ae eens SatishMayla 18.How do you embed Google map in visual force? 19-How do you pass the parameters from page to page ? 20.What are custom components? 21.How do you make a VF page available for Salesforce! 22.How to use Sforce connection ? 23,What is custom component ? 24.How to inplementautoLookup and query from VF pages ? 2) Apex fundamentals 1, What is Apex ? 2. What API is used in the apex? 3. What are the access modifiers in the apex? 4. Whats the difference between With Sharing and Without Sharing ? 5. What is a constructor? 6. What is the use of the static variables? 7. What are reference variables in apex? 8. What are Sobjects? 9. What is the difference between List and Set? 10. What is Map in apex? 11. Can we have duplicate Keys in Map 12, How many objects we can store in list ? 13. What are setter and getter methods? 14, How do you refer to current page id in apex? 15, How to do you invoke standard actions in apex class? 16, What is page reference? 17. How do you pass the parameters from of apex class to another 10 another? 18. What is virtual class? 19, What is interface? 20. What is abstract class? 21. What is overloading? 22. What is overriding? 23,When we invoke with sharing method in without sharing class Now method is Executed as? 24, Will the inner class inherits the sharing properties of cuter class? 25.Base class is declared as With Sharing and Derived class is declared as without ‘Sharing what will happen? 26.Can Ihave constructor with parameters in apex? 27.Dereferncing a Null pointer value error? 28. Variable is not available? 29.Too many Records ‘10001 By Satishiviayla 3) 4) BY Batch Apex and Schedule apex questions. 1. What are the Soq] limitations in apex? 2. What are transaction limits in apex? 3. What is the need of batch apex? 4. What is Database.Batchable interface? 5. Define the methodsin Batchable interface? 6. What is purpose of Start method in batch apex? 7. What is the Database.QueryLocator ? 8. What is the lterable ? 9. How to define the custom Iterable? 10, What is the use of execute method? 11, How many times execute method is called? 12, Whats scope of execute method? 13, Can we call callouts from batch apex? 14, Can we call another batch apex from batch apex? 15. How many callouts we can call in batch apex? 16. If you get Callouts Governing limits error how do you rectify? 17. Batch is synchronous or Asynebronous operations? 18. How to synchronize the batch apex? 19. How do you call batch apex from the batch apex in earlier versions of API 26.0? 20. What all the general ervors/ exception we will get in executing batch apex? 21. What is the maximum size of the batch and minimum size of the batch? 22. Tell some of the scenario’s that you have developed using batch apex? 23. What is Database BatchableContext ? 24, How to track the details of the current running Batch using BatchableContext? 25. How many batch jobs can be added to queue? 26. What is Database, tatefull interface 27. Whit is Database. AllowCallouts 28, Why should we call Database.execute() and future methods in Test.startTest() and Test.StopTesi() 29. What is ASyncApexlob object? 30, When a BatcbApex\Worker record is created? Schedule Apex : 1. What is Schedule apex? How many ways we can schedule the batch apex? What is Schedulable interface? ‘What is the order of execution? ‘How can we schedwle the batch apex? vases SatishMayla 6. How many schedule jobs we can schedule at a time? 7. What is cronTrigger? 8. How to identify the jobs next schedule? 9. What is the difference between Synchronous and Asynchronous jobs ) 10, How many future calls we can make in aday? 11. ‘What is the difference between manual schedule and apex schedule? 12, What is the best scenario that you have designed using schedule apex? 13, How to invoke asynchronous cattomts iarschedule apex? 14, Can we call synchronous callouts in Schedule apex? 15, What are the problems that you have encountered while using schedule apex? 5) Triggers: A, What is trigger? 2. What are differenttypes of Triggersin sf? 3. What areTrigger Context variable? 4, What is the difference between Trigger. New and Trigger NewMap 5. What is the difference betweenTrigger. New and Trigges.old 6. What is the difference between and Trigger. New and Trigger.Old in update Triggers 7. Can we calk the Batchspex. from the trigger? 8, What are the problems you have encountered when calling batch apex from the trigger. 9. Can we call the callouts from triggers? 10. What arc the problems than you encountered while calling apex callouts in triggers. 11, What is the recursive triggers? 12, What is bulkifying triggers? 13, What is the use of future methods in triggers? 14, What is the order of executing the trigger apex? 15, What is trigger handler? 16, How do you avoid recursive triggers? 17, How many triggers we can define ona object? 18, Can we define two triggers with with same everit on single object? 19. Tell me some scenarios’ where you have written the triggers? 20, What is the best scenario that you have developed on triggers? 21, How many time workIlow fled update will be called in triggers? 22, When are the rollup’summary fields are calculated ? 6. WebServices: 1. What is the difference between HTTPI.0 and HTTP 2.0 2. Difference between REST API and SOAP API? By SatishMayla 40 8, Inhow many ways we can deploy the code from sandbox to production? 9. What all the problems thet you have when we are deploying ? 10, What should you use command based deployment 8.Flow and Plugins 1 What are visualflows ? 2.How to define custom wizards? —S-Hiow-icrintegrate visualflows to visualforce page ? 4.What is process.plugin 5.How to call webservices fiom Flows ‘6.What are the updates on flows in winter 15 9.Custom Setting, 1 What are custom settings ? 2.What are different types of custom setting ? 3.When to use Custom Setting and Custom Labels 4.What are global actions ? 10.Mailing Concepts |What is the difference between SinglefmailMessage and MassEmail Message 2.How to pass the VF page as PDF in Email 3.what is TargerObject Id 4.What is the difference between whold and what 1d BY SatishMayla 3. What do you mean by statefull? 4. How many types of WSDL we have in salesforce? 5. What is the difference between Enterprise ,Partner WSDL? 6. What is difference between Webservice and Callouts? 7. What is the use of Metadata API? 8, How to fetch data from another Salesforce instance using API? 9. What the annotations in salesforce? 10. In How many ways we get the session id using SOAP API? “11. Can we use Http callouts in SOAP API? 12, How to pass the session in REST API? 43. How many ways we can provide security in REST API? 14, What is diffenectbetween OAuth 1.0 and OAuth2.0 2 15. How many ways we can specify the Request Header in REST API to getaccesstoken? 16. What types of response you have taken from the external server? 17. Can we ealll any resource from external server using url? 18. What is future annotation ? 19, Did you work with heroku? 20. By default webservices are synchronus/asynchronous ? 21. Have you worked in Siebel to Salesforce data Migration? 22. How to implenient Salesforce to Salesforce connection? 23. How to call Apex method from a Custom Button? 24. Have you worked in integrating Google chart? 25. What is Meta Data API 26. What is the use of Tooling API 27. What is the use of Apex WSDL 28. How to create a new Custom Object usingwebservices? 29, How to create a new Custom Fields / Workflows using webservices? 30. How to connect Microsoft excel to Salesforce ? 31. Data migration using third party tools like Informatica cloud ? 32. Did you use any email campaign services ? 7. Deployment and Change Sets ‘What are the diffent types of changesets ? How to create a sandbox ? How many times we can refresh a(configuration /develope/full) Which things we can not pass using the change sets to production? Can we move the record types using the change sets to production? Can we move approval using change sets to production? Can we move role /users/profiles using change set to production? pay sepe By SatishMayla 12 a OO SO 1g 4 4 Ape. ; Apex isa Strongly typed abject osierted propoammin? languos a ~> Te allows the douelopest fo execute lone ard transaction 1 Contsal Statements. —> Aper enables Pavclepuss to add business logic to most gygtam | cuenta lite button clicks selated record apdates ard Yisualfcke | ie { ay — Apex language & \. al ') Doteguated \- Gt praides. built im oR OML calls. ') Dnlane calesfeee Cbiect qpeay wees 3 wW fany to wie,,2o- fo y Eaay to test. SS \ W) Voasion ie ui) Mult tenant axa When should ¢ user STO Create erfell, seunice. > Cooate “webeasvices — poster “complex validation overs ‘multiple objects, | >. PO Grate Cornpler. business processes thatoxe not suppdted by | — Greate custom teunsaction logic. — Attach custonn logic to anoltes option. DAAIMADAAH PARRA AHA MM AARA HARA RAS = SO CCCCT TE TTC CT TT TET Che eee ee eee esse sii siT ve ASE All apex psograrrs tens entively ON—damand on Fore con Platform, How does A : 2. —> Foret the platfosen application Sasves Covnpiles tho cece into 7 abstaact cet oF Tnttsuctions that can be turdusctoed by Ape dentine intespwiey > Tha Compile Cede Is Stored to rretadota. > When the ered ares trigqane tre exocedtion of Apex by clicks button 2) wisuolfde page the application feruey yebsion the. Cornpiled inatsuction’ fron the Tretadeta und some them to | Sun ticre Intespretes belo relunrirg the vex SS | Obiect Osiented prograxnrning (Oops) -- Ww Cop (cect siented pregrarsming’) is a. ty that prouides o Hoy of ynedulasising “a. program faxtitioned merrosy | axa $8 both date and ethos bo ued ag termplate fo) | Creating cepiea of seach modalese(c ects) on devrand, ee” nlite. precdaval progitintithy , hase iy the cop. propsarnm vmadah,, Preqeamg, asa. Bhanized assount objects and data Eccapculation “re hnvapring cep of data cond Yretheds togethag is called oncapsulation. po example , Pf ne tate Acleg, We wsite tho. wasiableg curd methack tsida tha clast. thes | clase te birding thom tegathes fo case i¢ an exarnpe fd encapsuladion, Dnbositance = Te cwoder nen dares trom exisisting chsses,s0 rot the naw charges will acqtsise tl the features ef the exisisirg chases iS called Inbesitance. A qed example $3 Ivioxitance in rature fg parents peaducing the childyon and chien iehesitirg Che quallitica of the paxonts Polymesphicm + Polyrrasphicw sepresenis one fom in roaltiple Joures. Bh programming jhe GH wae @ Single jabb to wolas 4 objects of different types ard 4 Ugg Shot \lasrable ho calh the ‘methede of di x eaten) ‘type of the Apex. fundamentals 2%. Sa Dato. type aps “FelWabolt Juhat type of data can be Moved. oe # > Hhagss the vail y petiole ‘WD collections ti) Enuerne i) Premitive dake types These. ase the cota typee Which are predefined by the Apox. fo data, that can be. Siosed —> A prersitiva dota types Such as an Intequs , Double , org, Pate, Dole Rme, String , 20 3 Beck, CHP ORME OCREETEH HOE OE EER ER ARARAAOS OPO SOOCES ,eb bela ne eee desea we a wwe ee eee ee eee Swe H EE DEE EEUU Y CEU AS — All poemnitive chte types O82 payed by value wet by wferorce 2 My Apex waotiables ahathas thay O10 clays mnombes vashiobles ;axg “Titiali2ed 1 Pu Make cure thot Uae initial2e Vausiables to appropriate Yaluos before using them Apex Premnitive chdatyges includ Boolean = Value Hot an oaly bo cunigned tau fol Eg: Boolean isActiue=palse: wv 4 Date > A value thot indiates a. passtieulasy 2 valuas Contain no ‘twfosmation abut time Dole ual © odtoaye be canted With a Systarn State ‘method. & EX Dato. mnypaie =Date. ao 0919 output §kQQYos- 15 00:00:00 - ethle an dose types aasocioted worthy costep ard times along ¢ ith Dale chia. bp the tHroz dato. type, Stosoy times (hounds, sairutes , Second! and ypillicecords). the dole chta +3e@. Bosca datos CYeaus month ard day) . the Dote time Astostypa Gosea both dates and Hoes. Each of theve clasreg has a reaTnstane method with cabich Use can contact Poxriula, date and time Yolues . Eq= Tima 41> nenTnatance (tq 20)! 2°); ofp B 19:20:01 Apex~ 2 9 he an ako code chtes ard tims from tie cussent clock Date my = Datettmne.nonc); Pate 4 > Date-tnday( > The cote and Hime classes alee have instance matheds a Conuasting from one format to anethay , Eq Tima tg= datetime. now). timed): — Jae can ako rasipulate the values by ey of Smstanw. ‘methede ~ Deste EFS 0G - 16.9 00; coro Anteguaptong, Double aga Yecioal S- To Store Durmneaie Values ‘iy asiabehigeoeh a, oiables coith ene of tHe numeric lta type, Dhieges, tong,, Bouble ard decimal. Tntegus = A g2-bit oumbes that doen't include a chacivral fecint: Ink awe Q motrin Value of -2, (43, 483 ,64YB and a Maxine Vala of &) 144, 483, HF qe Tnteges, 121; oe o« J @ « e « e eeonee Cereerenvooseen SOR PO PROBE ne tee ne eet er ec ee ee ee te ee ae ast AS las isa Cellection of catamenrbess and tmethede Er cla Studant Integey no; ")_____—sthate axe datarnernbesg Stving yare ; tho clag public void getDetails () f —> This Ie a Gyatemn-chbug @sollno! +70); * "ae Sygtehy -dabug (‘narre! -trarne); co 5 § er class Erployee Doiequy ep; ( > Wosiiables atorrernoess Stoing dapStient,: of tre clase, \toid e005 -syfethet of [Jissie the lofe F the chu 70 dafina an Apex class Specify the follouing iy Acenas-madifiosns t= —> You Tmust use ome Of the ccese THedifiass 4H top (eual clay. (public dglobal) > you do not hair to ge, accags Yrodifiess ny the declaration af Inner chasers . oO i) optional definition ‘wads Such a E if istual | abstact| ith shang | " core] “Gosttigure [oplermnts dnteufoceNarnalist terds Chygnare | Cone)’] Le § GIRO OROODD PODS OO DRE lek be bm bbe eee eee SIRPP ROE EH PERE HABBO EHRAEEEE x 8 ae ga Hove Leer sl eseber sso SG Ld sr ELS ses Fis d AS Accosswnadifiens ¢- ) private :- Tf youdeclare a clase a psivate Tis only Enecon to the Bleck tn cobich it ie declared. — By default all tre itor clase axe. private, &) publte- TP you ceelane clays ay a public , thie Clase ie visible throughout yous application end you can Accom pepliation Oiny CohUse a 3) globad - @ gyou deck a cc is Visible to all the apex apreatinec fs application &) outside the application: fey NOTE '- od i Ho. wated Bacher Ce 5 SPis duclan ax global thon the | top lexal cla aly an chelared ag glctal.. Wy With Shaxing “| Sfosing % cons ceclase 0. dar Ge a. ith ghasing , Kon to the ctessont Ugas, Will be taken into the ard the Wer can accore & pasfdinn Lhe operating | . Gn the Paguristions Guan to him on Object Bfekle. | \ Qa leuat socuasity , Shaxing wsuley’) . S)hthout shaxing:~ 2F yen dockne a. chy. as a. without thos then this opee clog mine in cysiony meee Abich meane | par cede fag accete to all tha ohiecke and fialde JOses pectiye of cirsant tyes chasing gules , Held level eocursity , cbect Pastmigsions. a “1 BP the claw ig rot declared a4 With eharing O° isithouk shang thon by the clas ig by dafoult: token ag & Beth wres claxed ard cutes caked Gb te declased ag Uithskaring 3) TP irmesclas is ceckrsed ag hlithehasing and trploul clage ig docked og Hitheut thaxirg than bp sso. Context withvun in Hithsharing Context. h) apa clas is not declared ax Lf agit ord ift his claw is called by an thon foth the clases muy 5) Osterchy i dock? rexINg and inna cla i¢ declared ag litho @ my) tana Clase sune in Hithout Shasing “Context enlip. (Srey clasces don't take the pacgeatissisha vg Propustieg ) fiom cuter class), 6) Vistagl, te HA gfeloss Ye declued bith foyeedt vitteal. than thie dass can fe exterded(2nhosited) & this clas’ trothade Cain be ovessiddon by aging a cla called ovessriddan, ahi ing is enforced D Abstsact'- this claw contains Abstyack methede. Jub CS ELE <é e betwee Ss Hee SLE SL EL ESL ELE Al Ege ~ peablic. chase otrteniclass j[cede | Clagy ‘nnaschss i i If drimscle cole 8 a Ege; public Lath Shasing chy [echo bq4 + ~ pable Hlth shaxing class cates Rye [custo clay code Githouk Stosing clay ipnay ; [/ trey don code “~ 9s a DP ft \\Doners clare code Cyt & ev 4 4 or Bh this both jnnay ard culeg clases sunt with Gamat — Spa . ur Urose issiOns. 4 pesmi aM a. debe ee OFC SOE SSeS EK Seber obcedetcssebedoaTob ah ; A3 Class Vowiables + The \natables In the Class Should pacify tha following propecitieg When thay asa defined. {) optionals traditions Such a3 Public 0b final a8 well ag Static. "y Requrisedd 2 the deta type of the wartiable ; guchag Stsing ov Boolean. ‘t) optional + The volus of the Uasiable “\ S ‘W) optional ¢ the mame of the Variable wr Site: we [peblc private { protected [glo [static] % wal : Madifies , Such og pablic ov protected. 5 aquaised , The clair type of tho Walaa setwrned by the mathe) Such 09 String & Integy . Ce Void if the rmethed coed not sebtwn 0 Value. Ti) Ragprised + A list af tnput pascarnetess fobthe methed , Seporoied by Commrat ;@ach Poecelad by ite cloia.tyre, ard ercloted in, parantheses () TF those ase Po pasoretess , cue a sat of errpty pactentheyey A mathed can only Faye 32. input parameters ‘\y roqised the body of the "netted, enclosed in brace f % ALL tho cade oh the. Yeethed: iincluding ony local Vas table declasations, is contained hege. Syntax Coublic [Private | protected | global } Coyesinridgah, (static } dota type smnethed_ name Cinpet ¢ \\tbe body of the malig See “putt Deloss Example “ Gres Sheen (Srteg age) aso dabag Cy og i 4050); 5 5 PPP Clee ppreeeeree ¥ Evicodsd eve Pee SEC EK SEES LES LEE ETSI EE Sede x Object ‘ object ig o instance of the cla. This has both State and behaviour — nerrosy 43 tho dotarmembsss axe allocated only whan you Create a obiect - Syntax'- Clasename objectrame = vey clasgrama( hea Ao” - L toy i “this the Tone : y he of JSnhich dha Constexct - . velewance GC oune Cwealirg Uastable gre Qn obitct. ay i class Example \\codo GSeetauctd) ig a. Special ‘rothod which hoxe the felling Psyeation. 1) Method Mame eill be Sarre ag clase. 1) Aecogespeci ens eal bo public TY this vrottad call tnuoted only ome thatt is at te fine of Creaking an object - a7 ivy This i¢ Used to Tnstantiate the data rmombess of tha clay. Ege public chugs Teatobicct \\the mo Gagurnent Conttouictos public Testobject¢ > oer eres oP 2 oo 22 oP 2 fae e doen't Contain any Construct) then 5 tap defoaslt: Coeaker a. deermmy Conshuctd} on the Tarn of cla when we crete of object $b the clayg. yr ee class Exarnple Sebaawuan § Example @ = eH Exavenphe ¢ 4 areas SHPPP POPP OO eee PE Ra Be SsdsetFodadsotalbis esbstes SESE KEELE SELES : AID Ty the abeve Cxcimple, the azex class docwn't Contac any Constsuctdr « 80 phan we omecde Abiect 4 Example cla the Apor Comst lay cwoates adskault Gonstwuctos. at public example) $ Vo 3) Nov- paxgurahutined constant Pose Consuls | that Tk is 0. conttsuctd,coem't have Fess, oF Constsucts) | EYP publ, clagt Example ma me, f &d Toteqes sn0; SS $e) DF MOMet agi zed , Conttsuctor — This is Ino - paraunetebited | Conttyuctoy | ite a pox. prograa to demonstrate Usage of Gnstructh 1) Open daualopar Consele unde, by clicking the Nowe on the Sabesfctee. page - Q dice File & sclact Apex class. 3) Ente. the class name. hy bivite tha Aper. clay ar Public clags Employee String Ermplayee Name } Intequs, Enployee Ne Pale Cryer) 2 a. e,; ey e e, Ors Qs Public. iid Shoot) = : “2 ey ey Systor, C ernployeenams we "-templogename): : : dabug a ~Systerm cabug (‘enplsperio up! + englageno); a3 3 e . ey 4 eh Oy 9 Oley 6.38 wo det reed ee Tebot FeIed tee eS See See SEE ES LLC ETS AM 5) Open the c1nonyecug block . Ermployee @I= nen Employee ©); Employee @2 = teh Ernploype (9, Cl showotd; 2 - Show ();, ‘this coll gue ap output of Employee Nana ch Hag and Empl ‘s WQS Emplyeeno sto SS Eraploycenorne. AS Ye Employee usage of Apex paoquarn ps a Vigual}deo page :- Ybthen get. asent to we ator as $n vieualfiico. page be have to declase in we “fellowing orm, ce Athoneeag, tee a wisualfee page in Which Controlleig, IS defined it ewill fisst create aun object fal the apes | ce hich ety defined tn Conterllars,, | yn Lthar Gbiect Is cidsatecl fos tha Apo clagg fingt St invore the | Corgtouctos . 31 Peféreing 40 the apex clays ronmbere in visual 1 kan yete coaunt to refes, Oper clos Yasiableg in the visual Loe fage coo. raed to Use Geltoy & Settes methods. gee) public clay Example 7 : Sting rome; or g ‘ = get method e ‘this is & Vasiable dofined in apex ches, Bn the abou Staternant visualfece Page is. tayi ng to we Myra Vausiable Which ig daclasad in Apex clagg.so itis Inve custornaticlly getMynarmed ) ‘Tnethed! tn the aper.clo and this methad will sehum the valas of that SRE oo SHPIPP RPP HOD TTOHTO P9998 2e gee! ~ 3 sedel Tet pablic t Steing name dlasg Exarnple / Ae = aoe Public void set oing ‘vane 4 — sattas, rrathad thi cotll ‘take tho vealys Srom tho. Witual{éee. pag Bis Stoves to the Ape: fyi ame. McG te widen this- Name = Tame; Public String Jet Named ) Bes FoTotbotledod Cesaeede z CEE SECEEE EERE wekusn Name; a Ualue too g v page whanenay a Toe | vable ig called. b Se) oe EQ” public Class: & 3 this-no =o, b Public Trteqaa qetNoc > Fetus PO} 3 | | | WHsite ao exarnple teh gettow sanethed Usin wisualdgca and at thod (ging Witual idee on oper dass = “Example clae + public class Example t Stig Wame ; public Sting getName (> 7 ; | i Betws “Bain 5 NO bog AS 8 . Example. Page = AS “Caperspage contol ERtynple'S Q i . |nairag 3 Youd mam ie $1 namey & age =O, ts z OTP r ee epecccces i or rnpreserconers aoe eee 8 ede See E CeCe EE Seb e eee EEE Te Tab art Celstcalebs Aly public Tnteqes, geblgec > f DetwwN og | Public sity getName > £ Detusn ‘Soin kuna’; 4 XO 4 Sv nee & Sapet: page conteollasy = "Exar MO Soper toutputtabel > 1 BOS ipaanty ~ Heike on angechet fo deworstale Setter Trethed i.e, 2 values And Saving the vals to Oper Uasiobent} Public loss Example Public Sting ‘vane ; Public, String getName (> t Deturn oree | 3 Pubic ueid Stare (String name) this. name="name 5 4 & WE Pege : © Ss mame is ${ name} rife a. Public Trteges f set ; get ;3 IPP P PDE Eee e tees pepeey Pith 299 ee eee es fEtt S9PR z 8 Ca we => be gs ORC eee eee ee CTETET Cet Calas ast How to call the apex tetheds in a Viguoliéee page Public Clax Perro £ Public pageReference show) t Betumn dull // hon we give dele, i “ze? sill corna 4 Bock to. the Sarpo “pale. we! ake? J luhen ox eficle on thes! GP ote tt cell Invotce “ Pagerefarance Show) Whethod. —> Pagereferance 's, the delurn type of very Tethed that Ke © howe called for viewalfSco page . Pesblie close Exarnpler Public Stoing ‘Payne Public Suing gqevamec ) Telus Narre > 3 e i id Gott Cte « om ool Nowne. (String rar) i e this.name = varre ; & g i Public PageReferonce hoc) £ > | Nome = This is THK ane! +Tax, z vetusn Noll: apex :inpariae tt Wycl ite, - » wit ualue = "click" seRandes = "one"! _—_ : Action= "{ shea d'/s X¥ | name} < [aper: Js e (pee: page > tenes ve Oe as eeeud Teled doled ci pele dee ee eH bee veh eee ede TK CE ANG EQh Strmple apex clas to pesform addition od eubtgaction based tn the button you hau clicked. Public das, Erarnple | g public Prteges buake § fqar js0ti § e fublic Integes atialas faxt seks? ww patte Enteges raat ERIS public Stving oparation { get, Sesubt = dale +bvaluo » Operation = ' ADDITION a sekusn val» 3 3 Saperx:fosn > Sapex:pageplecr title ="\calucatatc "> ‘Oper :pagasloceSection columns ="{" ttble ="Gimple cpesationy collapsible = "false"> Soper: page Glect section tam > Spor: inpat Text value =" laud 4 é ock Section tem > al 2 Z *. Soe . 3 ‘ ile ane you. havo Peafoomed g Lepenoston’ Ory iy @s OF flowalie’ ard fi bualue ar} tHe seth =i Ci oesult <(apon: ccdpatl abel s 5 hay S/opa: fag elccksectisntterns. oar Jaber pogpalece Qeetions 3 / Nopan: pagedlocke> es fap chine ee, ‘ \fapac: page= oa 8 , Bet UIT ee ae ee ee ee ee ee ee ee AN HOBO tresag is acollection of Sivmilax cements ,whaaa the rremdy je allocated Sequontly . PotoRyper] axaumarme = nero Cotarypelsi2e ; Ibis is called dynamic doclax TniegpatT Tasks nen Dniegac 3 fd iy ¢ Account O41 = New Account (nite Karn’), Account a2 =Pe Accaune!Cratre = vavn'); Account [7] acc = neh ‘Actount CI fa >4, Stingr J 8 Si.e Pan Stringer 3} "2am rau’, ‘Saxo, Saurn’g » Sta fatter Gising C4): 2: ‘kumass «Bim 'eavi QL vite a progsam to display axios) of Stinge in Pagealock Table AM Public Clase Avaasy Example f Pable Ctoingh J wyral fsck ;qet; 2 Pablie Sting saree f get sei; Pablic AvayExarrplely rane = ‘prarad' ; ~ non ShirglT £ 'sorn', “& 5 Sape: meebo NON, Soper pagplestgh — “ph myual9” vas a'> sms Sy fay" “sy rable Nopar:quliuttanal > {Lrarne’} \(eaper :pagesloce > Slopor toms “N/a pet: page > SPOR PERE RR oases eee de bee ee FLU ELE FLT ee sub ub crews ended As OF vite a psograrn tb display ouay of account seconde cing Public chug AareayExaureple { eablic Aeewantl I aroy\iou feet: get, & public Arsay Example > ¢ eS Account al = ren foe 2nd ting"); Account 02=1W Account 7 ¥, Dndstay=" ‘Banking'); Aconunt ag =ron on RS ‘Proween’, Trekettey =| Banking); mos =raw ape, A203 S38 Copa : pageBlock > Oper pagelock ane volun =f) myvaly” wag, =! Caporicelemn Value = "§ laname? "/> SCapex:columy valu ="¥ Va trchuntery3 7>- \(opex: pageslocieTable > Soper catpetlabel > fname } Sopexsform> S/opex :page> Picelist using electoption from Apex — Y COper: Selock dist Chae =" {" > Pen calactoption Citermvaltia , ‘temlatal) 2 pablic clagg lect Example f Public selactaptionc Toyoptions £sek + get 5» Public cdactErarmplec ) ulacteption ops = ren sdectoption (‘oull} ‘-Wone-!) Leloctoption Opl = von Celoctoption Clore’, NToun'); PP RP eeeee PPP PTH POOR RD OH EOE Sears ReR ee a eeeP Rekbadaas cerns 24k Fs Bee AY solactoption op2= new sdactoption(’ teoo', ‘feb! “raupptions = Ne Seloctoptionc J f0p3,0p1,op23 § 5 ok Caper: forme > Naperselacttist cide =" > c Xa fs hv “Paper scalacttist > Cape: Selecttist dia’ ’ Capen: Slaten ‘itembabd = "Jaya" temUaluc="Taua'S <(aper:selactoptions SSiictoption ‘itembobel = "SOC" fomValus ="se "> Differonce bekwaen “Aeron ard collections . Ase Collectiong . L Asvoy ic Collectionct L-teis acollection of hornagento Us Csimilos) Clomnants. Q, Aeron con not qr ond shrink dyrarniclly. > Ate ie Bh oxdased Collection of elernants, that oe dhistoguithd by theis Indices. da: —) List adormant? Gan he of ang cbtatype- premitive type collections , sdbiecks , Wiex -daPived typed and builtin oper type: PP PPOPOOPPePepesses ¥ | aeerer aftradt oe : # tia Pf 2 Pe epg ee Bhai, &. 48 PFOOREOAE be

You might also like