• Home
  • About
    • Leadership
    • Partners
    • Blogroll
  • Force-Squared Blog
    • Tips and Tricks
    • Configuration
    • Development
  • Support
    • Knowledge Base
    • Submit a Case
  • Is It Dreamforce Yet?

X-Squared On Demand

Salesforce solutions delivered

  • Home
  • About
    • Leadership
    • Partners
    • Blogroll
  • Force-Squared Blog
    • Tips and Tricks
    • Configuration
    • Development
  • Support
    • Knowledge Base
    • Submit a Case
  • Is It Dreamforce Yet?
  • Tips and Tricks
  • Configuration
  • Development
You are here: Home / Salesforce CRM / Native Application / Chatter / Chatter Publisher Actions (Part 1): Create a Record

Chatter Publisher Actions (Part 1): Create a Record

June 28, 2013 by David Schach 5 Comments

Chatter Multi-Dimensional Publisher Logo

One of the most interesting – but least explained – features of Summer 13 (184) is Chatter Actions. There are three kinds of actions (Yes, you thought there were two, but there are more!) and after writing a few of each, here are some examples. The documentation is, as of this writing, both incomplete and incorrect, so this should help a bit. I also found some gotchas when using Chatter actions in a specific setting.

Chatter Actions fall into two major categories: “Create a Record” and “Custom Action.” There are two locations for Chatter Actions: Object-specific and Global, meaning that Create actions and Custom actions can each be executed from a specific object Chatter publisher or can be created from the general publisher found on the Home and Chatter tabs.

To review:

  • Create action
    • Global
    • Object-specific
  • Custom action
    • Global
    • Object-specific

Clear, right? We could visualize it as first Object-specific, then Global, but that wouldn’t demonstrate the real differences and advantages/drawbacks.

This is the first of two blog posts. Today we’ll deal with “Create action” Publisher Actions.

Global Create a Record Actions

These are the most simple of any action. Select any object from the picklist (even ones that are not Chatter-enabled), name the action, and hit save. The icon matches the tab icon, unless there is no tab; for those, you will need to pick an icon you have uploaded as a static resource. There is no choosing from the existing tab icon set we have grown to know and love over the years.
Next, edit the layout to show about 8 fields, and provide default values for picklists, text fields, etc. You cannot provide default values for lookups.

These records can be created from anywhere, including the Home and Chatter tab Publishers, and they are standalone. That means that they do not default any lookups to any values. Want to insert a Case? That’s great, but you will need to type the Account and/or Contact in the proper fields. Want to add a Task and relate it to a Case? Have fun; you’ll need to find the Case Number and type it in the proper box. And good luck auto-filling the Contact on that Case without using a trigger.

Standard Create a Task Publisher

Note that the Contact is not filled. To fill *two* relationships, you will need a custom publisher and some Apex code.

More sophisticated orgs will want to avoid using Global Create actions because even entering an Account record is probably more complicated than can be encapsulated in 8 fields – that don’t recognize page layout-level read-only attributes. That’s right: These create actions are truly global.

So I guess you’ve figured out that I’m not a big fan of Global Create actions.

Object-Specific Create a Record Actions

I like these a lot more. Choose an object (standard or custom), add an Action, select Create a Record, choose from any child object, plus Task and Event (if the object is Activity-enabled), add a Label and Name, update the layout, and you’re off to the races.
In this example, the relevant lookup field is populated. For example, if you create a Task in a Case action, the Task WhatId field will be populated with the Case Number. Again, you’ll need to use a trigger if you want to populate the Task Contact with the Case Contact, but that is beyond the scope of this post.

Of course, what would a post be without saying “But there’s a catch – there always is?”

Publisher actions can only be executed from the Chatter publisher. This means that you can set them up for any object, but you can only customize the Chatter Publisher on page layouts for objects that have Chatter feed-tracking enabled.

There are far more gotchas with Custom actions, but you’ll have to wait for the next post to see those. I will show code for creating a Task from a Case, creating an Account from the Home tab, and creating a Task from a Case while using Case Feed.

There you have it: Create a Record Custom Actions.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to email a link to a friend (Opens in new window) Email

Related

Filed Under: Chatter, Configuration, New Features, Summer 13, Tips and Tricks Tagged With: Chatter, Configuration, Force.com Builder

← Create and Populate a Map Without Loops Chatter Publisher Actions (Part 2): Object Custom Action →

Comments

  1. Aiden Martin says

    June 28, 2013 at 17:00

    Nice explanation of the how but I really don’t get the why. How does creating another method of creating records help my users?

    Reply
    • David Schach says

      June 28, 2013 at 18:22

      For this example, it is just a quicker way to create a new child record. And IF that child record doesn’t require much of a special layout, then it’s a good thing. But you’re correct – The standard CaR publisher action is pretty limited. The custom one (which I’m writing about now, with code samples) has more power.

      Reply

Share Your ThoughtsCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Is it Dreamforce Yet?

Find out!

Find us on the AppExchange

Mass Update Contacts 2.0

Get It Now

Recent Posts

  • Prevent Duplicate Emails on Leads
  • Duplicate Record Item Enrichment and Auto-Deletion Code
  • Lightning Component With Running User Information
  • ChatterBINGO is Now Open-Source
  • Display Only My Role’s Records on a Report

Post Categories

Popular Tags

#df09 #df10 Akismet Apex AppBuilder AppExchange Appirio Astadia Blogs Chatter Configuration Content DreamFactory Dreamforce Eclipse IDE Enterprise Force.com Builder Force.com Platform Google Infowelders Integration Just for fun Lightning New Developments New Features Partner Program PersonAccount Projects Publisher Salesforce Salesforce1 Salesforce for Google Apps sfdcverse Sites Visualforce Web-to X-Squared On Demand

Find Us Online

  • Twitter
  • Facebook
  • LinkedIn
  • RSS

Subscribe

RSS Feed Comments

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 164 other subscribers

Copyright © 2008–2025 X-Squared On Demand · Genesis Framework by StudioPress · WordPress · Log in

 

Loading Comments...