Using "Formula Fields" in Streaming Newsflash Criteria

Streaming Newsflashes use Salesforce's "Streaming API" to track changes on individual records. Unfortunately, Salesforce does not support formula fields in the queries involved with each "Push Topic".

If you are trying to use a formula field in your Streaming Newsflash criteria, you will get an error because it is not supported. However, you can work around this by creating a new field on your object, which is updated by a Salesforce workflow. Here's how!

Create a Field Updated by a Workflow

  1. In Salesforce Setup, navigate to App Setup > Customize and select the object upon which your Streaming Newsflash is based. 

  2. Click Fields to see a list of fields on your object.

  3. Click New to create a new field.
    1. Specify the field type. Example: if the number you're seeking to use in your criteria is a currency, select Currency.
    2. Give the field a label, and save.

  4. Navigate to Create > Workflow & Approvals Workflow Rules.

  5. Click New Rule.
    1. Select the object upon which your Streaming Newsflash is based.
    2. Give the rule a name.
    3. Specify the rule criteria. Example: if you want to update a certain value when a deal is won, add "Won equals True". Save.
    4. Specify the Workflow Actions.
      1. Click Add Workflow Action and New Field Update.
      2. Give it a name, and select the field to update.
      3. For options, select "Use a formula to set the new value"
      4. Enter the formula that gives you the value you need. (This may be copied from the formula field you originally wanted to use in your Newsflash criteria.)
    5. Save.

  6. Once your new field and workflow are created, edit your Streaming Newsflash criteria such that it includes the new field.

  7. Make sure you've added your Newsflash to your Channel, then test it out!


Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk