Populate reference field on record producer URL

mdandrade
Kilo Contributor

I would like to use a URL to create and populate a record with predefined values. I am able to populate all fields on the new form with the exception of a reference field. I will be able to provide the number of the record associated with the reference field (i.e. INCxxxxxxx), but the field will only be populated when I supply the sys_id. Is there a way to convert the record number into the associated sys_id within the record producer URL?

 

Example

Works:

https://service-now.com/nav_to.do?uri=task_time_worked.do?sys_id=-1%26sysparm_query%3Dtask%3Dd25e4d22db725b048d067fda8c96191e

Does not work:

https://service-now.com/nav_to.do?uri=task_time_worked.do?sys_id=-1%26sysparm_query%3Dtask%3DTASK0191936

 

8 REPLIES 8

Hi...yes...you're not understanding nor are you following what I mentioned.

In the documentation it says this: https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/use/navigation/concept/c_Navigati...

So if you change your URL to do:

sysparm_query=number=INC0412228

or perhaps remove number and place task...it should work.

Just like that.

The = sign shows for other parts of your url, but not the sysparm_query, try doing it exactly how it's mentioned.

Other examples here: https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/use/navigation/reference/r_Naviga...

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen,

 

Appreciate your help on this, but after reading through the articles you sent, and trying your recommendation, this method is still not working as expected. Might be something specific to my instance.

 

Thanks

Harsh Vardhan
Giga Patron

adding doc link. kindly go through that. it has mentioned example , how it works.

 

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

Already mentioned that in my post. Thanks...


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!