Exceptions to Validation and Workflow Rules [Best Practices]

Posted February 25th, 2012 in Tips & Tricks by John Coppedge

I find it very helpful to provide a method to turn off/on validation and workflow rules on a per user or per profile basis.  Advantages:

  • Data migrations and manipulation.  I was loading contact data split into two files (1st for name, 2nd for contact details), while a validation rule prevents creating a contact without a phone or email address.
  • Integration.  Often times integration should not be subjected to the same rules as a typical user.  You could hard code the integration user details into each validation rule, but that isn’t very extensible.
  • Flexibility.  You’ve got it.

 

There are two basic ways to accomplish this:

1. Add exception fields to a custom setting.  There are some complexities with this method but it is my favorite (make sure to set org wide defaults!).

2. Add exception fields to the user record.

Here’s a brief overview of the pros/cons of each:

Custom Settings User Record
Per profile & per user. Per user only.
Must be manually migrated to new sandboxes (except for full sandboxes). Carries over on user record when sandbox created.
Workflow rule conditions must be written as “when formula evaluates to true”. Workflow rule conditions can be constructed as normal.

Continue Reading »

Rollup Picklists to Master Object [no Apex required]

Posted November 10th, 2009 in Tips & Tricks by John Coppedge

How can you translate text from a related list into a field on your master object?

image

Magic.  Pure and simple.  That, and formulas.  Lots of formulas.  We’ll call it Formula Magic.

This works by assigning each entry within the picklist to a range of digits, using a roll-up summary formula to compile the totals, and then using remainder calculations to determine type.

Here’s how to set it up:

Continue Reading »

Summer 09 Training

Posted July 20th, 2009 in Certified Administrator, New Releases by John Coppedge

 

With this release, Salesforce certified folk are only required to complete training.  No exam required! 

I believe this training is open to the public.  I was able to access it through this link, while logging in through one of my uncertified accounts. 

 

The Sales Cloud

 

Analytic Enhancements

  • Charts
    • Greater control over labels and colors
    • Donut and Funnel chart types added
    • Not automatically enabled.  When enabled, you cannot return to the old charting engine.
  • Dashboards
    • Brighter colors and additional colors added
    • Display actual amounts and percentages on graphs
      image
  • Analytic Snapshots
    • Can now be bundled in managed and unmanaged packages
    • Schedule and running user cannot be packaged and must be configured after package installation

 

Automated Campaigns

  • Campaign Member
    • View/edit/delete/clone each record
    • Custom fields and page layout editor now available for campaign members (e.g. RSVP status, Food preference, etc.)
    • Workflow rules for campaign members (e.g. if RVSP “Yes” send email alert with agenda)
    • Use triggers for additional customization
    • Setup –> Customize –> Campaigns –> Campaign Members

 

List Views for Account and Sales Teams

  • My Sales Teams is now a filter criteria for list views on accounts and opportunities (account teams must be enabled)
    image
    image

 

Recurring Tasks

  • Can edit individual tasks, or the series
  • Must have an end date
    • Provided button to calculate max end date (based upon number of tasks created)
  • Recurrence icon on recurring tasks
    image
  • Turned on by default (but can be turned off)
  • Outlook sync not supported for recurring tasks (planned for a future released)

 

Admin Enhancements

  • Platform (Force.com Edition) profiles can now be given 10 existing CRM administrator permissions
  • Delegated data administration now possible (View All and Modify All per object) on platform profiles
  • Profile Setup Audit Trail logs changes to a profile, change author, and time of change
  • When cloning a profile, Login Hours and Login IP Ranges are now cloned as well

 

Content Enhancements

  • Content delivery now includes option for password protecting content
  • Administrator can set default password (org wide) for content delivery
  • Reporting for featured content and ratings
  • Creation of content packs and the presentation assembly can now be disabled (org wide)

 

Mobile Enhancements

  • Blackberry
    • Related list now on the detail page of a record
    • Clone existing records
    • Create links from Salesforce records to visualforce pages or web tabs
    • Improved Storm support
  • iPhone
    • List view enhancements
    • Lead conversion support
    • Calendar style browser for events
    • Products and price book support

 

Sharing UI Enhancements

  • Sharing administrator pages load faster
  • Customized list views

 

 

The Service Cloud

 

Salesforce to Salesforce Cases and Case Comments

  • Share records from one organization to another (Salesforce to Salesforce)
    • Supports cases, leads, opportunities, accounts, contacts, activities, products, opportunity products, and custom objects
  • Near real time updates
  • Includes reporting and workflow capabilities
  • Records can be shared manually or through sharing rules

 

Advanced Customer Portal User Management

  • Ability to disable customer and partner users (new buttons on contact record)
  • Ability to disable and an entire account’s access to customer and partner portals (new buttons on account record)
  • Portal users can now be transferred between accounts (will take on role of new account or create a role will be created if none exists)
  • Portal users can now be merged

 

Advanced Case Workflow

  • Workflow rules can now be created when comments are added to cases
    (notice that case is now selectable when creating a workflow rule on case comment)
    image

 

The Custom Cloud

 

Force.com Sites

  • Publish VisualForce pages to branded domains entirely through the force.com platform.
  • Sites is now live!

 

Organization-Wide Email Addresses

  • Generic from email address and name
  • Specify which profiles can send from each org wide address
  • When sending an email, users select the email from the “from” address
    • Can only be used when sending a single email (no mass email support, no workflow rules support!)
    • Email address must be verified (activation link sent to address)

 

Workflow Process Visualizer

  • Graphical representation of approval process (BETA)
  • Read only representation

 

Visualforce Enhancements

  • Ability to add visualforce page as a dashboard component
    • Will display information based on the user logged in, not the running user
  • Ability to use visualforce pages as custom help
    (when users click this link) 
    image

 

Declarativ
e App Builder Enhancements

  • TEXT() function support for picklists in formulas and workflow field updates
  • INCLUDES(), ISNULL(), PRIORVALUE(), and ISCHANGED() support for multi-select picklists
  • Support for encoding functions in formuals: HTMLENCODE, JSENCODE, JSINHTMLCODE, URLCODE
  • Managed package versioning and deprecation support

Workflow Approval Processing

Posted October 31st, 2008 in Certified Administrator by John Coppedge

Define the basics of the Workflow Approval Process

Let’s go through the steps:

  1. User submits record for approval.
    There is no method for automatic approval submission.
  2. Does this record match the criteria for any approval processes on this object?
    If yes –> Step 3
    If no –> Reject
  3. Perform initial submission actions
    This will always include locking the record so that no further changes can be made until the approval process is finished.
    This can also include other workflow actions.
  4. Record enters approval steps.
    Appropriate parties must approve/deny record.
  5. One of 3 approval process completions occurs.  In addition to locking or unlocking the record, each of these completions can has its own set of additional workflow actions.
    Approval.  Record is approved by all parties.  The record is locked by default.
    Rejection.  Record is rejected by any part.  The record is unlocked by default.
    Recall.  Record is recalled by submitter. The record is always unlocked.

 

Compare and contrast the Approval Processes versus Workflow

Workflow Rule Approval Process
Automatic (triggered when record matches criteria) Manual.  Can only be invoked if record matches criteria.
No interaction required (time-based workflow rules are transparent as well). Each step of the approval process requires interaction from a user (approve/reject).
Uses workflow actions Uses workflow actions
Does not lock the record under any situation Locks the record during the approval process.
Changes to record tracked normally (as if user initiating the workflow rule made the change) Approval process audit history listed in separate related list on object

 

List the differences between the Jump Start Wizard and the Standard Approval Process Wizard

The jump start wizard will create an approval process with one step using a set of default values.  See “Approval Process Jump Start Default Selections”.  Essentially when you create an approval process using the wizard you’ll get an approval process with one approval step and one set of filter criteria with the default values.

 

Explain how to route Approvals

Approvals occur within approval steps.

Each approval step is:  1) ordered in number of execution, 2) has its own filter criteria for entry, 3) designates an approver.  Here’s how it plays out:

  1. Record is submitted for approval and meets initial criteria.  Start first approval step.
  2. Does record meet criteria (or formula) for this approval step?
    If no –> skip/approve/reject.
    If yes –> require approval.  Designated approver approves/rejects and chooses the next approver if required.  If the next approver is automatically selected through a hierarchical relationship, the current approver is used to determine the relationship (not the approval initiator).  This can be used to route approvals through several tiers of management.
  3. Repeat step 2 until out of finished with approval steps.  If record has passed/skipped all approval steps, then process approval actions.

See “Useful Approval Processes” for examples and additional info.

 

Create and test the Approval Process

Take a simple hierarchy:

  • VP
    • Manager
      • Worker

Create an approval process using the hierarchy from worker to VP with filters at each step.

 

Identify the settings in creating Workflow Approval Processing

Filter Criteria

Next automated approver – used for hierarchical approvals

Administrator only or Administrator and Approver record modification

Email template – template that is sent to approver when an approval is required from that individual

Approval Page fields – these are the fields that show up on the approval page

Security settings – set if page can be viewed from Salesforce mobile, or only from a web browser

Specify initial submitters – who can submit the record for approval (by default this is the record owner only)

Workflow

Posted October 28th, 2008 in Certified Administrator by John Coppedge

Explain how salesforce implements workflow and when to use Salesforce workflow

Workflow rules are Enterprise+.  A workflow rule is triggered based upon pre-defined criteria (e.g. Opp Amount > 100k).  The workflow rule triggers workflow actions which can update fields, send emails, etc.

 

Workflow Rules Criteria:

  • When a record is created, or when a record is edited and did not previously meet the rule criteria
  • Only when a record is created
  • Every time a record is created or edited (may not be used in conjunction with time-based workflow actions)

Filter criteria must be entered as well, same functionality as a report but is required.

 

Workflow actions can do one of the following:

  • Create tasks
  • Send emails.  There are some limitations here- for instance, whoever activates the workflow rule will be the sender of the email (from cannot be set).
  • Update fields.  There are some limitations here- for instance, you cannot update a lookup field.
  • Send outbound message (used to send information to external services).

Workflow actions are either:

  • Immediate
  • Time-based

 

List and describe use cases for the four Workflow Actions

Create tasks.  Close/won opportunity and create a task to follow up with client in 90 days for sales rep or CSR.

Send emails.  Case resolution time was greater than 7 days, CSR management with case details.

Update fields.  When creating an opportunity change the name of the opportunity to include “Account Name – Opportunity Name”.  This way if you search for ABC company you can see all opportunities on the search as well.

Send outbound message.  On opportunity close/won and sale requires shipped product, send outbound message to order fulfillment program.

 

Explain the capabilities and settings of a Workflow Rule

When a record is created, or when a record is edited and did not previously meet the rule criteria.  Just like it sounds- rules are executed when the record is created and meets the filter criteria.  If the record did not meet the filter criteria but is edited and then does then the rule will execute.  Workflow rules can be executed multiple times under this setting (record matches & rules execute, record is changed no longer matches, record changes and matches- rules execute again).

Only when a record is created.  If it doesn’t match filter criteria on creation, the rule will never run.

Every time a record is created or edited.  If the filter criteria matches whenever a record is saved, execute the workflow rules.  The reason (my 2 cents) this cannot be used with time-based workflow actions is because it could potentially create an enormous queue of actions to take place in the future (save and save and save- each time a new set of actions is created 90 days in the future)- this really isn’t practical.  This actually is not possible with the top setting as I will explain below.

 

Describe the differences between immediate and time-dependent Workflow actions

Immediate workflow actions execute the instant the workflow rule criteria is met.

Time dependent workflow actions are attached to time triggers.  A time trigger is a defined interval, measured in hours or days before or after any date or date/time field on the object (e.g. 7 days after case open).  Multiple workflow actions can be assigned to a single time trigger; multiple time triggers can exist per workflow rule.

When using “When a record is created, or when a record is edited and did not previously meet the rule criteria” only one set of time-flow actions can exist.  If the record is modified and no longer meets the criteria, any pending time flow actions are removed.

Example:  If case is open after 4 days email case owner.  If case is open after 7 days email management.

Create workflow rule (when record is created or did not previously meet), filter criteria IsClosed=False.  Create time trigger for 4 days after case creation.  Add workflow rule to email case owner.  Create time trigger for 7 days after case creation.  Add workflow rule to email management.

How it works:  CSR opens case.  Case is closed after 3 days.  Case is reopened after 5 days.  Case is closed at 8 days.

Case opens- workflow pending at 4 days and 7 days.  Case closed- no workflow pending.  Case reopened- workflow pending in 2 days (CSR email not created as it would have occurred in the past).  Workflow rule executes to email management.  No workflow pending.  Case is closed.

 

Set up a Workflow Rule and associated actions

Try my example.