+ Start a Discussion
PRIYAPRIYAPRIYAPRIYA 

Apex Code Examples/Samples, Practice and Use cases

Hi,

 

I have read the Apex concepts but I am not getting enough confidence in Apex coding, probably I need to practice more.

I was looking for Apex code examples/samples and use cases in google, but couldnt get any.

Can you please let me know if you have links to the Apex code examples/samples and use cases for Apex to try practicing.

 

Also for Apex classes and triggers, please let me know the following:

 

1. On which parts of Apex, I need to start for code practice and how to proceed further.

2. While practicing, what should be the areas that I need to practice more

3. What areas of Apex are commonly used

4. What areas of Apex are complex which needs more practice

5. How to frame the use cases myself for Apex code practice.

 

 

Thanks,

Priya.

HariDineshHariDinesh

Hi,

 

You can go through cook having good code samples and you can participate in discussion boards to share and update your knowledge.

 

http://developer.force.com/cookbook/

 

For the questions you have

 

1)      You go through Apex book like

http://www.salesforce.com/us/developer/docs/apexcode/index.htm

2)      We can’t say commonly used area like that, but conditional statements (if, for..), Collections(set, list,map), Property variables(getter settes), test methods, etc  will be used commonly to write any code.

Awinash Kr.Awinash Kr.

I am dealing with same situation. Any other helpful stuff apart from cookbook ?? 

Ankita123Ankita123

I have gone through apex work book and i want to explaore further can any body please suggest some scenarios and code examples.

Usha Charles 3Usha Charles 3
I also looking for the same info... couldnt get any from Google..
Pooranachandran GanesanPooranachandran Ganesan
You can find sample and use cases here
http://www.sfdc99.com/beginner-tutorials/
 
Pooranachandran GanesanPooranachandran Ganesan
http://ccoenraets.github.io/salesforce-developer-workshop/
 
Pooranachandran GanesanPooranachandran Ganesan
http://www.youtube.com/watch?v=7QEVT0JMXAU
Pooranachandran GanesanPooranachandran Ganesan
https://developer.salesforce.com/calendar
Hazee.LiHazee.Li
This is a good point to start https://developer.salesforce.com/trailhead  (https://developer.salesforce.com/trailhead)
Prem TiwariPrem Tiwari
Read More from here Salesforce tutorial for beginners (#)
kundlik Yewalekundlik Yewale
1) Make two number fields on contact object
Amount_X
Amount_Y

2) Make one picklist field "Type" , values ('Positive', 'Negative')

3) Make two number fields on account
Rollup_Amount_X
Rollup_Amount_Y
Rollup_Amount

4) Make one trigger on contact object, which will do following:
--> Sum all child of contact's field "Amount_X" and store in parent account's "Rollup_Amount_X" Where Type is "Positive"
--> Sum all child of contact's field "Amount_Y" and store in parent account's "Rollup_Amount_Y" Where Type is "Negative"
--> Sum all child of contact's field "Amount_X" + "Amount_Y" and store in parent account's "Rollup_Amount"

5) Make trigger as bulk / Test class
Srinath TrainingSrinath Training
sfdcinpractice.com is one of the best sites to learn programming basics and apex codiing for beginners.
raj_sfdccraj_sfdcc
Hi Priya ,

Before starting the Apex ,You should have basic knowldge of OOPS concepts in java .

1. On which parts of Apex, I need to start for code practice and how to proceed further.

Ans :Start writing simple codes like Basic insertion of sobject records.

2. While practicing, what should be the areas that I need to practice more.

Ans :Once you get high level concept of Apex ,You can start writing visualforce page with custom controllers .

3. What areas of Apex are commonly used

Ans :It would completely depend on requirement .

5. How to frame the use cases myself for Apex code practice.

Please find the below post which can provide you basic Apex classes with the description .

Apex Code Examples (https://salessforcehacks.blogspot.com/2020/01/sales-force-basic-apex-class-examples.html)







 
Sourav PSourav P
https://developer.salesforce.com/docs
raj_sfdccraj_sfdcc
Hi ,
You can find the below post for more apex trigger examples .
Apex Trigger Examples (https://salessforcehacks.blogspot.com/2020/02/apex-trigger-examples-salesforce-apex.html)