Question

How to remove activity quick action

Hi,

how do I go about removing this button on the contact page?

Thanks

Like 0

Like

1 comments

Hi Tyler,

1. Create a Replacing View Model

2. Select "SectionActionsDashbaord" as the parent

3. Add this code:

define("SectionActionsDashboard", [], function() {
	return {
		diff: [
			{
				"operation": "remove",
				"name": "TaskMessageTab"
			}
		]
	};
});

Note, this will remove the task icon from the actions dashboard on all pages, not just the contact page. If you only want to remove it on the contact page and leave it on all others, use this code instead:

define("SectionActionsDashboard", [], function() {
	return {
		methods: {
			getExtendedConfig: function() {
				var config = this.callParent(arguments);
				config.TaskMessageTab.Visible = (this.get("EntitySchemaName") !== "Contact");
				return config;
			}
		}
	};
});

Ryan

Show all comments