[UI Builder] Displaying the Activity Stream on Custom Tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Fellow SerivceNow Developers!
I've been struggeling the past time with trying to configure the Activity Stream and Activity Stream Compose components on a custom table; adding them as components in UI Builder, and for some reason could not get them to show, and when eventually I got them to show the fields would appear in the form, as well as in the Activity Stream Compose.
Since I found a solution I thought I'd share it, as I could not find any comprehensive knowledge articles on this topic.
Activity Stream and Compose
These components are filled by the Form Controller and can be filled using presets. For this example I've used the Record activity stream for activity stream combo preset. For the Activity Stream compose I've used the Record compose for activity stream combo preset.
Both of these components are in completely stock configuration.
Fields
You'll need two new fields on your custom table, both of type Journal Input. The fields are comments and work_notes(altough this one is optional).
Form
In the form of both the default view and the one you use in your Workspace you'll need to add the Formatter named Activities (Formatter) and you need to add the created fields to the form.
From now on the Activity Stream should show up in your forms and also on custom Record Pages in UI Builder.
But right now (depending on your configuration) the fields Comments and Work Notes still appear in the form, and are therefore duplicate of the Activity Stream Compose. To prevent this we need to configure UX View Rule Configuration.
UX View Rules Configuration
With the View Rules we can define a rule to Hide Journal Input type fields. This rule is specifically designed for this activity, as regular UI Policies will hide the fields from the Compose as well. Navigate to UX View Rules Configuration and create a new config for your app.
Create a new Rule for your table and the appropriate view, deselect Experience Restricted and in Form Settings select Hide Journal Input Fields.
Congrats!
You've added the activity stream to your custom table and successfully hid the journal input fields on the form using the Next Experience settings.
Cheers!
- 280 Views

