clicks vs code df14pptx

39
Clicks Vs. Code An Interactive Debate Christopher Alun Lewis Force.com MVP @ChrisAlunLewis Simon Lawrence Force.com MVP @srlawr

Upload: christopher-lewis

Post on 27-Nov-2014

70 views

Category:

Software


1 download

DESCRIPTION

Are you a Developer or Administrator and want to learn more about your application building options? Many requirements in the Force.com development world can be achieved using either custom coding solutions or point and click configuration. Join us as we outline some of the most popular scenarios of this type, and then present the pros-and-cons of Clicks and Code so you can vote on which approach you think is best. This session is going to be highly interactive and is open to all Force.com Developers and Salesforce Administrators.

TRANSCRIPT

Page 1: Clicks vs code df14pptx

Clicks Vs. CodeAn Interactive Debate

Christopher Alun Lewis

Force.com MVP

@ChrisAlunLewis

Simon Lawrence

Force.com MVP

@srlawr

Page 2: Clicks vs code df14pptx

Welcome to Clicks Vs. Code

There are two main ways to get things done on Salesforce

• Rarely black and white as to which provides the best solution

• This session will make you think about your options in different scenarios

Page 3: Clicks vs code df14pptx

Welcome to Clicks Vs. Code

• We will present three requirement scenarios

• We will then present a clicks solution, and a code solution

• YOU will then vote which you would implement

• Get involved!

Page 4: Clicks vs code df14pptx

Scenario 1

Copy and process field data across a relationship

When an invoice line custom object is created, we need to:

• Copy the price field from a parent product object

• Copy the tax rate field from a custom setting

• Create a task to manually check stock when QTY > 100

Page 5: Clicks vs code df14pptx

Case for Clicks

Create a workflow rule on line item object creation and field updates to copy the price and tax.

Page 6: Clicks vs code df14pptx

Case for Clicks

Create a workflow rule on line item object creation and field updates to copy the price and tax.

Page 7: Clicks vs code df14pptx

Case for Clicks

Another workflow rule, checks Quantity amount and creates a task if needed

Page 8: Clicks vs code df14pptx

Case for Clicks

Another workflow rule, checks Quantity amount and creates a task if needed

Page 9: Clicks vs code df14pptx

Case for Clicks

Benefits:• Simple to setup• Can be updated and altered on live• Responds to data model changes automatically

Drawbacks:• No requirement to test the calculations and vulnerable to interference• Very limited customization of the Task• Difficult to see the order of execution

Page 10: Clicks vs code df14pptx

Building with Code

• Write test class and cover core scenarios

• Create a trigger on Creation of an Invoice Line

• Noting bulkification, load the relevant product details and copy into the Invoice Line records

• Create detailed task records for > 100 Quantity cases

Page 11: Clicks vs code df14pptx

Building with Code

Page 12: Clicks vs code df14pptx

Building with Code

Benefits:• All the logic is in one, concise place• Complete flexibility in field and data access/usage• Can create dynamic Task owner, subject and description• Requires test coverage which enforces functionality

Drawbacks:• Has to be promoted via changesets if updated• Requires manual maintenance if data model changes• Will take longer to develop, test and promote

Page 13: Clicks vs code df14pptx

Scenario 1 voting

So where do you stand?

ClicksCode

Page 14: Clicks vs code df14pptx

Scenario 2

Summarize Opportunity data on Accounts

On the Account page we would like to see:

• The total value of all related Opportunities

• The closed won ratio of related Opportunities

• The Average value of related Opportunities

Page 15: Clicks vs code df14pptx

Case for Clicks

Use roll up summary fields to obtain:

• The related Opportunity count

• Won Opportunity count

• The related Opportunity total value

Page 16: Clicks vs code df14pptx

Case for Clicks

Use roll up summary fields to obtain:

• The related Opportunity count

• Won Opportunity count

• The related Opportunity total value

Page 17: Clicks vs code df14pptx

Case for Clicks

Use roll up summary fields to obtain:

• The related Opportunity count

• Won Opportunity count

• The related Opportunity total value

Page 18: Clicks vs code df14pptx

Case for Clicks

Use formula fields to calculate:

• The Closed Won ratio

• The Average Value amount

Page 19: Clicks vs code df14pptx

Case for Clicks

Benefits:• Simple to setup / five fields to completion• We can adapt the method to do more complex calculations quickly

Drawbacks:• Roll up summaries are limited, only 10 per object• This method only works for objects that have master detail relationships • Roll up summaries don’t work on formula fields

Page 20: Clicks vs code df14pptx

Building with Code

Create 3 new fields on the Account object:

• Total Opportunity amount• Closed Won Ratio • Average Opportunity amount

Page 21: Clicks vs code df14pptx

Building with Code

• Write test methods

• Write a new trigger on Opportunity to update related Account totals when an Opportunity is created, updated, deleted or undeleted

Page 22: Clicks vs code df14pptx

Building with Code

Page 23: Clicks vs code df14pptx

Building with Code

Page 24: Clicks vs code df14pptx

Building with Code

Benefits:• Excellent reusability… adopt a pattern and the same code can be used many times for many different object relationships

• Calculations can be much more complex, involving several related objects• Can traverse Lookup relationships and summarise Formulae• Test methods can be used to verify results

Drawbacks:• Writing code and related test methods is time consuming• Less adaptable in production

Page 25: Clicks vs code df14pptx

Scenario 2 voting

So where do you stand?

ClicksCode

Page 26: Clicks vs code df14pptx

Scenario 3

Graphical customer relationship view

We want to view our entire relationship with a customer • The pipeline of all related Opportunities

• The number and status of all related Cases

• A history of recent Activities

Page 27: Clicks vs code df14pptx

Case for Clicks

Simple… Reports and Dashboards!

Create a collection of base reports

• Opportunities

• Cases

• Activities with Accounts

Page 28: Clicks vs code df14pptx

Case for Clicks

Create an Accounts Data dashboard leveraging the reports to show all Account data

Page 29: Clicks vs code df14pptx

Case for Clicks

Use a Dashboard filter to allow the user to select which Account they want to view data for:

Page 30: Clicks vs code df14pptx

Case for Clicks

Benefits:• Simple and quick to create (3 Reports + 1 Dashboard)• Can be customised to individual users requirements (specific Account views)• Clicking on the charts actually drills down into data report

Drawbacks:• A maximum of 30 filters can be used per dashboard• A manual filter needs to be created for each Account• Load times between selections is fairly slow (20-30 seconds)

Page 31: Clicks vs code df14pptx

Building with Code

Custom Visualforce Page with Account selector:• Leverages Apex:Chart Component tags• Account combo box dynamically populated through Apex• Upon selection, automatically refreshes page

Page 32: Clicks vs code df14pptx

Building with Code

OR Custom Visualforce on the Account Page:

• Use a controller extension to get Account/Children details

• Build Account charts based on retrieved data

• Place Visualforce page on Standard Account Page

Page 33: Clicks vs code df14pptx

Building with Code

As simple as a section of Visualforce code

Page 34: Clicks vs code df14pptx

Building with Code

And a controller extension to marshall the data about

Page 35: Clicks vs code df14pptx

Building with Code

Benefits:• No limitations on how many different Accounts you can view.• Fast screen refresh rates.• Ability to create actions based on chart results.

Drawbacks:• Time consuming to build.• Difficult to schedule content in an email.• Can’t easily drill down into reports data.

Page 36: Clicks vs code df14pptx

Scenario 3 voting

So where do you stand?

ClicksCode

Page 37: Clicks vs code df14pptx

The Wrap up

There is no “right answer” when it comes to clicks vs. code.

Attribute Clicks Code

Time to develop Short Long

Flexibility Some Lots

Limitations Restricted by platform Governor Limits

Adaptability Some Great

Page 38: Clicks vs code df14pptx

Any questions?

Christopher Alun Lewis

Force.com MVP

@ChrisAlunLewis

Simon Lawrence

Force.com MVP

@srlawr

Page 39: Clicks vs code df14pptx