Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to set default value for a reference field on Catalog form

rambabu1
Giga Expert

Hi,

i have a field on form it's reference field and i need to set default value for that field.

below is the script that i written in default value. but it's not working

find_real_file.png

 

14 REPLIES 14

Ankur Bawiskar
Tera Patron

Hi,

you are querying u_account with hard-coded sysId and again setting the same record sysId as default value

Why to have this?

Reference field is referring to which table -> u_account? if yes then directly give the sysId of the record

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Anukar, 

yes the reference table related to u_account table. and i am giving directly sys_id also not working

Hi,

are you sure that sys_id belongs to the same table which is being referred by that field i.e. u_account

Did you try to search on that table u_account.LIST and search with sysId = your sysId

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

yes ankur. i am giving like below still unable to get default value

find_real_file.png