Last Modified On: December 18, 2024
There may be instances when you would like to remove users' ability to use the "Insert Multi-Template" feature. It might be that you have a custom flow that automatically creates projects and applies templates, or perhaps only certain types of users should be able to use this feature.
You can disable the "Insert Multi-Template" icon in the Gantt Lightning Web Component (LWC). When it's disabled, users still see the icon, but it is grayed out. This help article will show you how to disable the "Insert Multi-Template" icon.
Please note the following:
This section will show you how to disable the "Insert Multi-Template" feature in the Gantt Lightning Web Component (LWC).
It is possible to have multiple instances of the Gantt Lightning Web Component (LWC) on the project Lightning record page. This means that you can add the same component several times on the same page.
This makes it possible for you to set the component visibility, which dictates when to display the component and/or also choose which features are available/unavailable. For example, you might want to disable the "Insert Multi-Template" feature for some users but have it still available for others to use.
Let's say that we want to disable the "Insert Multi-Template" feature for a specific user profile. To accomplish this, we would add the Inspire - Project Gantt LWC twice to the Project Lightning record page (see example below).
Next, click on one of them to select it. Then, in the panel on the right, you can set the component visibility. This is where you define the criteria by which to display the component, and enable/disable features. In the example below, the component visibility is set to only display the component when the viewing user has a role of "Customer Success".
By setting "Disable Multi-Template Insert" to TRUE, this means that this project Gantt component will display only when the viewing user has a role of "Customer Success", and the "Insert Multi-Template" icon will be disabled for them.
Now, we are going to click on the second Gantt component to select it. Then, in the panel on the right, we are also going to set the component visibility.
In the example below, the second component will be displayed when the viewing user's role is not "Customer Success". By setting "Disable Mulit-Template Insert" to FALSE, then users who do not have a "Customer Success" role are able to see this component, and they are able to use the "Insert Multi-Template" feature.
By setting the component visibility for each Gantt component, you are able to specify which component to display based on your criteria, and whether the "Insert Multi-Template" feature is available for the user.
Remember to save your changes after you are finished.