Reference qualifier on 'document' list of a Document ID field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:26 AM
Hello all!
How can I add a reference qualifier to the 'document' part of a Document ID field?
For example, in the table field of document id, I selected incident table and for the document field i want to apply some customised filter condition so that not all the incident record documents are available to select.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:28 AM - edited 01-30-2023 02:28 AM
@Jaisai Kuntala Hi! Check this link - https://www.servicenow.com/community/developer-forum/document-id-field-reference-qualifer/m-p/149808...
Please mark it helpful if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:43 AM
You can create document ID fields to reference any record on any table.
A sys_id is useless without a knowing what table the record resides on.
Alas, a Document ID field needs to be coupled with a Table Name field.
First you will need to create a 'Table Name' field (let's say 'u_table').
Once you have done that,open the Dictionary entry of your Document ID field and set the dependent field to 'u_table'.
Then you can write the following code
current.u_table = 'incident';
current.u_doc_id = SYS_ID;
current.update();
Please mark it helpful if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 03:51 AM
Jaisai,
Were you successful with this? Have you found answer to the question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 03:24 AM
Were you able to configure this? I've a similar requirement.