---
sourceDocument: Australia Employee Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/pt-BR/employee-service-management

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Add a script include method

# Add a script include method for the Playbook tab {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Add a script include method that controls the Playbook tab visibility on the contract repository record by verifying plugin availability and applying conditional logic.

## Antes de Iniciar

Role required: admin

## Procedimento

1. Navigate to AllSystem DefinitionScript Includes.  
   The Script Includes table appears.
2. In the Name column, search for the Script Include where you want to add the method.
3. Open the Script Include record.  
   Figura 1. Script include form
4. In the Script box, add the following method.  

       hidePlaybookTab(table, sysId) { 
                               var pMgr = new GlidePluginManager(); 
                               if (pMgr.isActive("com.sn_cm_gen_ai")) { 
                               return new sn_cm_gen_ai.ContractsMetadataExtractionHelper().hidePlaybookTab(table, sysId);  
                               }  
                               return true;  
                               },

   This method checks if the Now Assist in Contract Management (com.sn_cm_gen_ai) plugin is active. If the plugin is not active, it returns `true` hiding the tab by default.
5. Select Update.

