Customizing the Menu Items for the Recently Viewed Records for Creatio Marketplace Add-on

The Recently Viewed Records for Creatio add-on has had some customizations options for a while now that I’ve not yet documented or mentioned. However, there are a few options you have for customizing things for the Recently Viewed Records menu items.

View Recently Viewed Records for Creatio in the Marketplace

The customization options include the following:

  • Customizing the text shown for a record
  • Disabling adding a section’s records to the menu

Customizing the Text Shown for a Record

By default, the text for a menu item in the Recently Viewed Records is the “Display Value” property for the object. As you can see for the Case object, the display value property is the case Number column. However, that doesn’t make it very easy to use, unless you’ve memorized the cases and their numbers, which isn’t likely. To customize the text for records of a given section, you simply need to add an attribute named RecentlyViewedNameOverride to the FormPage. For example, for the Case object, if we want to show both the case number and case subject, we’d add the following attribute to the Cases_FormPage (Note, to add an attribute, locate and add the code below in the viewModelConfigDiff in the page code):

viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
	{
		"operation": "merge",
		"path": [
			"attributes",
			"RecentlyViewedNameOverride",
			"value"
		],
		"values": {
			"columns": ["Number", "Subject"],
			"format": "#${col0}: ${col1}"
		}
	}
]/**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/

In the code above, we’re adding an attribute named RecentlyViewedNameOverride and set values for the attribute containing an array of columns we want to use in the text (in this case the Number and the Subject). We also include a format string that will be used. The column numbers correspond to their index in the array of columns (so in this case “col0” is the Number column and “col1” in the Subject column). The end result will be as shown in the image above.

Disabling Adding a Section’s Records to the Menu

By default, the Recently Viewed Records add-on tracks any object that is exposed as a Section. However, if you want to stop this behavior for a particular section, you’ll need to add the RecentlyViewedExclude attribute to the FormPage for the object. For example, if you no longer want to track Leads, you’d add the below to the Leads_FormPage (Note, to add an attribute, locate and add the code below in the viewModelConfigDiff in the page code):

viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
	{
		"operation": "merge",
		"path": [
			"attributes"
		],
		"values": {
			"RecentlyViewedExclude": {
				"value": true
			}
		}
	}
]/**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/

The end result will be that the section no longer gets tracked in the menu (previously added menu items will still show until cleared)

Want content like this delivered to your inbox? Sign up for our newsletter!
ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *