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
Kilo Patron
Kilo 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

MrMuhammad
Giga Sage

Hi,

You need to use  gs.getProperty('property name');

Regards,

Muhammad

 

Regards,
Muhammad

Aman Kumar S
Kilo Patron

Hi @Virendra Dwivedi 

You will need to

gs.getProperty("x_care3_carear_csm.consumer");

Remember, this will return a string value.

 


Feel free to mark correct, if your issue has been resolved, so it ends up in solved queue.

Will be helpful for others looking for the similar query.

 

Best Regards
Aman Kumar

Abhijit4
Mega Sage

Your question is bit confusing, could you please elaborate more.

If you want to get field value sys id via system property then you can store sys_id in system property and access it as gs.getProperty("system property name");

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Regards,
Abhijit
Community Rising Star 2022

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Hi @Abhijit 

How can get field value sys_id into system property , dynamically . I don't want it to be static .