The CreatorCon Call for Content is officially open! Get started here.

Display Sold Product field in the incident form via Client Script

Jan31
Tera Contributor

Dear ServiceNow Developers,

I’m seeking advice from more experienced colleagues.

 

Assuming this data structure:

incident -> configuration item -> install base item -> install base m2m installed product -> sold product

I have the following scenario:

In the incident form, display the “sold_product.availability” field value as read-only.

 

Would you prefer to get the value via a Client Script on incident form load, or would you prefer another, less performance-impacting method?

 

1 ACCEPTED SOLUTION

Bert_c1
Kilo Patron

Seems you are exceeding the dot-walking level limit. However, documentation is light on that aspect

 

https://developer.servicenow.com/dev.do#!/learn/courses/xanadu/app_store_learnv2_scripting_xanadu_sc...

 

 

Create a script include to retrieve and return the value. GlideAjax is used by client scripts to access data from the server. Many examples of this in your instance. Or you can try:

 

https://docs.servicenow.com/bundle/xanadu-platform-user-interface/page/use/navigation/reference/dot-...

 

in the client script.

View solution in original post

1 REPLY 1

Bert_c1
Kilo Patron

Seems you are exceeding the dot-walking level limit. However, documentation is light on that aspect

 

https://developer.servicenow.com/dev.do#!/learn/courses/xanadu/app_store_learnv2_scripting_xanadu_sc...

 

 

Create a script include to retrieve and return the value. GlideAjax is used by client scripts to access data from the server. Many examples of this in your instance. Or you can try:

 

https://docs.servicenow.com/bundle/xanadu-platform-user-interface/page/use/navigation/reference/dot-...

 

in the client script.