Disable Sorting on a Detail List in Creatio

Along the same lines as what I covered in a previous article on adding new rows in an editable detail to the bottom of the list, if your detail represents some sort of ordered or sequential items, you might want to also remove the ability to sort the detail as well. There are some details in Creatio where this is the case, such as the Sections in a Workplace when editing a Workplace in the Workplace setup.

Option 1: Removing the Column Headers

What the out of the box areas do to prevent sorting, such as the detail for the Sections in a Workplace, is to remove the column headers. You can do this by adding the following to the diff in your detail schema.

diff: /**SCHEMA_DIFF*/[
	{
		"operation": "merge",
		"name": "Detail",
		"values": {
			"wrapClass": ["hide-grid-caption-wrapClass"]
		}
	}
]/**SCHEMA_DIFF*/

This will remove the column headers for your detail list. However, I don’t really like this approach for all cases. Instead, you can do the following method.

Option 2: Disable Column Header Click and Remove Sort Action Menu

This alternative route will remove both the “sort” menu under the three-dot button, and will also make the column headers not sortable. If the user clicks a column header, nothing will happen at all. To do this, add the following code to the methods in your detail schema.

methods: {
	getGridSortMenuItem: Terrasoft.emptyFn,
	sortColumn: Terrasoft.emptyFn
}

Using this method, you’ll still have the column headers visible in the detail list. However, clicking on them won’t do anything. Additionally, the sort action menu will be removed as well.

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 *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!