Pass value from one form to another using URL params

Waru
Tera Contributor

Hi everyone ,

 

im trying to pass values from one form to another using a UI action in the context menu, but all of the related fields are not being populated only the strings , is there a way to do this ?

 

here is the code

 

var urlStart = '/rm_story.do?sysparm_stack=rm_story.do&sys_id=-1&sysparm_query=';
	var url = urlStart + 'u_related_requested_item=' + current.number
	+ '^description =' +  'ServiceNow Platform'

	action.setRedirectURL(url);

 

 

 

thanks a lot

1 ACCEPTED SOLUTION

I believe the Display vlaue for product table is number. Try passing number corresponding to the 'SerivceNow Platform' product and it should work.

View solution in original post

14 REPLIES 14

In that case current.program will suffice considering the display value is set. In other words, you need to pass the value that is the display value for the table.

However, current.program.sys_id should work as well.

 

var urlStart = '/rm_story.do?sysparm_stack=rm_story.do&sys_id=-1&sysparm_query=';
	var url = urlStart + 'u_related_requested_item=' + current.sys_id
	+ '^product =' +  'ServiceNow Platform'

	action.setRedirectURL(url);

 

im doing it this way , is plain text only

Unsure, if I understand. Does it work or it does not? Or something else is the expectation altogether?

for the Sys_id it works fine, that field product is another related field that should be populated with the string "Servicenow Platform" , but it's not achieving it

What is the Type for product field? Is it a reference or string or some other field type?