We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to get field value sys id into system property

Abhijit Das7
Tera Expert

Hi everyone,

My requirement is to get sys_id of the field value from cases table to system property . Then I want to get this system property into widget and script include.

Does getValue work on system property .

find_real_file.png

My field name is "consumer " in cases table .

Thanks in advance

cc: @Ankur Bawiskar

1 ACCEPTED SOLUTION

Voona Rohila
Giga Patron

Hi Virendra

Try this

var callerCSM = gr1.getValue(consumer_contact.toString());


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP

View solution in original post

13 REPLIES 13

Hi @Ankur Bawiskar 

you mean , i should use  var callerCSM = gr1.getValue[consumer_contact]; to get sys_id.

But even after changes I am getting null value when using gs.info rather sys_id.

 

Hi,

this will work fine

var callerCSM = gr1[consumer_contact];

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Voona Rohila
Giga Patron

Hi Virendra Dwivedi

I think you want to use something like this
 
var callerCSM = gr1.getValue(consumer_contact.toString());

 

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP

Voona Rohila
Giga Patron

Hi Virendra

Try this

var callerCSM = gr1.getValue(consumer_contact.toString());


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP