ServiceNow & MS Teams Integration - Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Everyone ,
When I click on 'Collaborate' and then on 'Import Microsoft teams Chat' , I have 2 options to manually import the chat.
1. Related to this record
2. List all conversations
I have to make the field default to 'related to this record' and make it read-only so that users wont be able to click on 'list all conversations'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
20m ago
Hi @Sairam3697 ,
In classic UI and Service Portal, you can use UI Policies or Client Scripts to set a default and make a field read‑only.
In Workspace (Agent Workspace / CSM Workspace), those scripts don’t always apply because Workspace uses its own framework.
1. Set the default value
Go to the field dictionary for the “Import Microsoft Teams Chat” option.
Set the default value to “Related to this record.”
This ensures Workspace loads with that choice pre‑selected.
2. Make the field read‑only in Workspace
Use a Workspace Client Script (different from classic client scripts).
Create a new onLoad Workspace Client Script for the form.
Example:
function onLoad(form) {
form.setReadOnly('import_option', true);
*(Replace `import_option` with the actual field name.)*
3.Test in Workspace
Open the record in Workspace.
When you click Collaborate → Import Microsoft Teams Chat, the option should already be set to "Related to this record" and locked.
