Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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
Mega Patron
Mega 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
2022-25 ServiceNow Community 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  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Voona Rohila
Mega Patron
Mega 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
2022-25 ServiceNow Community MVP

Voona Rohila
Mega Patron
Mega 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
2022-25 ServiceNow Community MVP