ログインユーザーをデフォルト値にしたい

慶吾岡
Tera Expert

User[sys_user]テーブルを参照しているフィールドのDefault valueをログインしているユーザーにしたいのですが、どうすれば実現できますか?

Client scriptなどカスタマイズを実施せずに実現することが理想です。

2 ACCEPTED SOLUTIONS

@慶吾岡 

 

Syntax used is incorrect, it should be 

 

Bhuvan_0-1761637105693.png

 

Refer below link for more details

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718092

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

View solution in original post

Ravi Gaurav
Giga Sage
Giga Sage

you have use javascript. it should be " javascript : "

javascript: gs.getUserID(). I have attached the image open the link in incognito once

RaviGaurav_0-1761637508090.png

 

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

View solution in original post

9 REPLIES 9

@慶吾岡 

 

Syntax used is incorrect, it should be 

 

Bhuvan_0-1761637105693.png

 

Refer below link for more details

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718092

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

上手くいきました。

ありがとうございます。

Ravi Gaurav
Giga Sage
Giga Sage

you have use javascript. it should be " javascript : "

javascript: gs.getUserID(). I have attached the image open the link in incognito once

RaviGaurav_0-1761637508090.png

 

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

@慶吾岡  Even You can accept more than one answer.. I state the same answer. You can accept mine solution as well

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

@慶吾岡 I was the first who gave you the correct answer you wrote wrong syntax

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/