{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":12510,"path":"employee-service-management/legal-service-delivery/snlc-add-support-doc-wdgt.md","title":"Add supporting document widget in own-paper record producer","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add supporting document widget in own-paper record producer\n\nAdd the supporting document widget to a record producer to enable uploading of supporting documents.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Legal Administration** &gt; **Legal Catalog** &gt; **Record Producers**.\n\n2.  Select the own-paper record producer \\(Example: Non-disclosure Agreement\\) for which you want to add the supporting document widget.\n\n3.  Configure the variable set.\n\n    1.  Navigate to **Variable Set** related list.\n\n        \\[Omitted image \"snlc-add-suppdoc-wdg-variableset.png\"\\] Alt text: Navigate to Variable set related list\n\n    2.  Select **Edit**.\n\n    3.  Add the widget by moving **Upload Contract Documents** and **Upload documents optional interaction** from the Collection to the Variable set list.\n\n        \\[Omitted image \"snlc-add-variableset-suppdocs.png\"\\] Alt text: Adding supporting document widget variable list\n\n    4.  Select **Save**.\n\n4.  Configure variables for **Upload documents optional interaction** variable set.\\[Omitted image \"snlc-add-suppdoc-wdg-variableset.png\"\\] Alt text: Configure variables\n\n    1.  Select **Upload documents optional interaction** from the variable set related list.\n\n    2.  Select **Variables** related list.\n\n    3.  Set the value for **internal\\_type\\_of\\_paper** to own\\_paper and for **internal\\_contract\\_type** give sys\\_id of the contract type associated with the record.\n\n        To get sys\\_id, go to contract type record, select and hold \\(or right-click\\) on the header and select **Copy sys\\_id** Example: If you’re adding the widget to the Non-disclosure agreement record producer, add the sys\\_id of the Non-disclosure agreement contract type.\n\n    The supporting document widget is available in the own-paper record producers.\\[Omitted image \"snlc-suppdoc-added.png\"\\] Alt text: Suporting document widget added to the record producer\n\n5.  Customize the standard ticket page to display the supporting document related list.\n\n    1.  Navigate to **All** &gt; **Standard Ticket** &gt; **Standard Ticket Configuration**.\n\n    2.  Select the record with table sn\\_lg\\_ops\\_request.\n\n    3.  Navigate to **Tab configurations** related list.\n\n    4.  Select **Supporting Documents**.\n\n    5.  In the script, find the following code block.\n\n        ```\n        answer = gs.nil(contractExecutionGr) ? false : contractExecutionGr.request_type == sn_cm_core.CMConstants.CONTRACT_REQUEST_TYPE.AMENDMENT_REQUEST || contractExecutionGr.contract_configuration.document_type == sn_cm_core.CMConstants.DOCUMENT_TYPE.THIRD_PARTY_CONTRACT;\n        ```\n\n    6.  Replace it with the following code block.\n\n        ```\n        answer = gs.nil(contractExecutionGr) ? false : true\n        ```\n\n    7.  Save the tab configuration.\n\n6.  Enable the supporting document widget in edit request mode.\n\n    1.  Navigate to **All** &gt; **System Definition** &gt; **Business Rules**.\n\n    2.  Search for **Contract-generation variable change** and open the record.\n\n    3.  Navigate to **Advanced** related list.\n\n    4.  In the script, find the following code block.\n\n        ```\n                msg = gs.getMessage(\"The legal request has been updated, and a new contract document revision will be generated based on the modified values.\");\n                          gs.addInfoMessage(msg);\n                          var externalSigners = JSON.parse(current?.variables?.external_signatory_details + '' || '[]');\n                          initiatePayload = {\n                              ...initiatePayload,\n                              externalSigners: externalSigners\n                          };\n        ```\n\n    5.  Add the following code block after the located code block.\n\n        ```\n         contractCoreUtils.createOrUpdateDocumentsFromWidget({\n                              ...commonArgs,\n                              contractDocuments: current.variables.contract_documents + '',\n                          });\n        ```\n\n    6.  Save the business rule.\n\n    A supporting document widget is available while editing an own-paper based request.\n\n\n**Parent Topic:**[Configure Contract Management Pro for Legal Service Delivery](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/legal-service-delivery/snlc-config-sn-legal-contracts.md)\n\n"}}