Getting Started With Apex as an Admin by Christopher Lewis

21
Getting Started With Apex as an Admin From Clicks to Code @ChrisAlunLewi s Christopher Alun Lewis Developer, Cloud Clew

Transcript of Getting Started With Apex as an Admin by Christopher Lewis

Page 1: Getting Started With Apex as an Admin by Christopher Lewis

Getting Started With Apex as an Admin

From Clicks to Code

@ChrisAlunLewis

Christopher Alun Lewis Developer, Cloud Clew

Page 2: Getting Started With Apex as an Admin by Christopher Lewis

Getting Started With Apex as an Admin

Why Code?

Changing Perceptions of Coding

Practical Methods in Learning to code Apex

Helpful Resources

What we will cover…...

1

2

3

4

Page 3: Getting Started With Apex as an Admin by Christopher Lewis

Why Code?The setup menu is fantastic, but it only allows you to do so much...

=

Page 4: Getting Started With Apex as an Admin by Christopher Lewis

Code is more fine controlledIt allows much more flexibility, to create more custom business processes

=

Page 5: Getting Started With Apex as an Admin by Christopher Lewis

Lose the labels!

DEVELOPER

ADMIN

SKILLS

UNDERSTANDING

Emphasis on skills over titles

Page 6: Getting Started With Apex as an Admin by Christopher Lewis

Apex Code != Explosions It’s ok to make some mistakes, you will not blow up your org!

Page 7: Getting Started With Apex as an Admin by Christopher Lewis

Keep safe with code

Get a

Developer

Edition

Make

Small

Changes

Use the

Setup

Menu

Test,

Test,

Test

Page 8: Getting Started With Apex as an Admin by Christopher Lewis

Getting Started Strategy : It’s all about what YOU want!In my experience, the best way to learn something is:

GET

HANDS ON!

CREATE SOMETHING YOU WANT!

Page 9: Getting Started With Apex as an Admin by Christopher Lewis

Example 1: Verifying Configuration Logic with Apex Tests

Changes are always happening in your org

How do you make sure all your workflows / processes still work?

Build an Apex test class! They ensure functionality works, not just code.

Tests methods are easy to start with as they always follow the same pattern:

SetupRecords

VerifyResults

Perform Action

Page 10: Getting Started With Apex as an Admin by Christopher Lewis

Example Workflow Rule

Page 11: Getting Started With Apex as an Admin by Christopher Lewis

SetupRecords

PerformAction

VerifyResults

Class

Page 12: Getting Started With Apex as an Admin by Christopher Lewis

Check the Test Passes Using the Developer Console

Page 13: Getting Started With Apex as an Admin by Christopher Lewis

Example 2: Automating a Repetitive Task

Have a mundane repetitive job you have to do every morning /week/month?

Use scheduled Apex to do it automatically!

Example: Deactivating users who haven’t logged in for 90 days….

Page 14: Getting Started With Apex as an Admin by Christopher Lewis

Example Class

Page 15: Getting Started With Apex as an Admin by Christopher Lewis

Scheduling Through the Setup Menu

Page 16: Getting Started With Apex as an Admin by Christopher Lewis

Scheduling Through the Setup Menu

Page 17: Getting Started With Apex as an Admin by Christopher Lewis

Example 3: Build an App/Controller to Help you!

Think of something that you wish was easier in your day to day job

Do you have a need to update several related records at once?

Mass migrate users between profiles?

Create it using a new Apex Class and Visualforce Page / Lightning Component

Page 18: Getting Started With Apex as an Admin by Christopher Lewis

Coding Buddies!! Check out your local Developer User Group

Salesforce StackExchange

Helpful Resources

Page 19: Getting Started With Apex as an Admin by Christopher Lewis

Getting Started With Apex as an Admin

Why Code?It opens up infinite possibilities of customisation not possible with clicks

Changing Perceptions of CodingOvercome your fears and be prepared to make mistakes, if you never try you never learn.

Practical Methods in Learning to code ApexUse Test Methods to verify your org configuration, build code that helps you!

Helpful ResourcesCoding Buddies / DUGs / StackExchange

What we’ve covered

1

2

3

4

Page 20: Getting Started With Apex as an Admin by Christopher Lewis

Q&A

Page 21: Getting Started With Apex as an Admin by Christopher Lewis

Thank Y u