Reference qualifier on 'document' list of a Document ID field

Jaisai Kuntala
ServiceNow Employee
ServiceNow Employee

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. 

6 REPLIES 6

SoniaShridhar13
Giga Guru

SoniaShridhar13
Giga Guru

@Jaisai Kuntala  

Document ID:

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 

Sergey Sidorin
Tera Guru

Jaisai,

 

Were you successful with this? Have you found answer to the question?

Amritha1
Tera Guru

Were you able to configure this? I've a similar requirement.