Admin Guide - Set the Gantt Lightning Web Component (LWC) to Read-only

    Last Modified On: December 16, 2024

     

    There may be instances when you would like to grant users access to a project but limit their access to read-only. This means that they are able to view the project but not edit or delete tasks and related records.

     

    You can grant users read-only permissions to projects by:

    • Adding them as collaborators with read-only access
    • Adjusting the default, org-wide sharing settings for Project object to "Public Read-only"
    • Configuring a sharing rule

     

    For more information on how to share projects, please see Options for Sharing Projects.

     

    To further restrict the actions that are available to users with read-only permissions on a project, you can also choose to set the Gantt Lightning Web Component (LWC) to "read-only". When the Gantt LWC is set to "read-only", the following icons and actions are disabled:

     

    • Project Toolbar - the following icons are unavailable and will display as grayed out.
      • View project detail (home) icon
      • Save As icon
      • Resource Utilization icon
      • Reset View icon
         
    • Gantt Toolbar - the following icons are unavailable and will display as grayed out.
      • Calendar (custom non-working days) icon
         
    • Project Task List - the following actions are unavailable
      • Ability to show/hide columns
      • Ability to re-order columns via drag & drop
      • Ability to move columns between frozen panel and task details

     

    In addition to the above, a user project settings record is not created for users where the Gantt LWC has been set to read-only.

     

    This help article will show you how to set the Gantt LWC to read-only.

     

    Please note the following:

    • You must be a Salesforce System Administrator to perform the steps outlined in this article as it requires access to Salesforce setup.
       
    • This setting is only available in the Gantt Lightning Web Component (Gantt LWC).
       
    • This setting can be applied to both internal Inspire Planner users and Experience Cloud users. 
       
    • Setting the project Gantt LWC to read-only will only restrict the user's permissions in the project Gantt. This means that if you've set the Gantt LWC to read-only for a user, but the user is granted editing permissions to the project either via a collaborator record, sharing settings or sharing rules, the user can still edit the project, project tasks and other related records outside the Gantt UI. 

     

    Set the Gantt LWC to Read-Only Mode

    This section will show you how to set the Gantt Lightning Web Component (LWC) to read-only.

     

    1. Click on the Gear icon in the top right corner and go to Setup.


       
    2. Go to Object Manager.


       
    3. Enter "project" in the Quick Find box and go to Project.


       
    4.  Next, go to Lighting Record Pages. Click on the project Lighting record page you are using. The image below is just an example.


       
    5. Click on Edit.


       
    6. The Lighting App Builder will be displayed where you can then make changes to the project Lightning record page. Click on the project Gantt Lightning Web Component to select it. Then, in the panel on the right, set "Read-Only Mode" to TRUE.


       
    7. Click on Save to save your changes. If you have not yet activated the Lighting record page, you will need to activate it as well.

     

     

    Conditional Read-Only Mode

    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 whether it's read-only. For example, you might want to set the Gantt LWC to read-only for specific types of users.

     

    Let's say that we want to set the Gantt LWC to read-only for Experience Cloud users but not for internal Inspire Planner users. 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 is a customer portal user.


    By setting "Read-only Mode" to TRUE, this means that this project Gantt component will display only when the viewing user is a customer portal user, and it will limit the user's access to the project Gantt to read-only.


     

    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 is a standard user. By setting "Read-only Mode" to FALSE, then standard users are able to add, edit or delete data in the project Gantt if they have been granted editing permissions to the project.

     

     

    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 component is read-only or not to a user.
     

    Remember to save your changes after you are finished.

     


    Tags

    Administration

    « Previous ArticleNext Article »