Making a Section Read-Only by Removing Add, Copy, and Delete Actions in Creatio

If you have a section that is populated from some external or automated source and you want to remove the ability for users to add, copy, or delete records, you can easily remove these actions from a section by adding some remove elements to the section diff. The add button at the top of the section, as well as the copy & delete row action buttons, come from the BaseSectionV2 schema that your section inherits from.

If you know what these elements are named, you can easily remove them by adding removes to your section diff. Open your section schema and add the following into the diff:

define("UsrMyObjectSection", [], function() {
	return {
		entitySchemaName: "UsrMyObject",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "remove",
				"name": "SeparateModeAddRecordButton"
			},
			{
				"operation": "remove",
				"name": "CombinedModeAddRecordButton"
			},
			{
				"operation": "remove",
				"name": "DataGridActiveRowCopyAction"
			},
			{
				"operation": "remove",
				"name": "DataGridActiveRowDeleteAction"
			}
		]/**SCHEMA_DIFF*/,
		methods: {}
	};
});

Obviously, you can pick and chose which ones you want to remove by only adding the appropriate elements to your diff. However, notice that there are two elements added to remove the Add button, one for the combined mode (when viewing a section list vs viewing an edit page in combined mode in a section).

For a similar topic, see my article onĀ Making a Detail Read-Only (or Removing Add, Edit, Copy, or Delete Capabilities)

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!