- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
04-21-2025 05:27 PM
はじめまして。
ServiceNowでカタログを開いたとき、質問に「本日から1ヶ月後の日付」を自動入力させる方法が知りたいです。
スクリプトであれば、その内容まで知りたいです。
解決済! 解決策の投稿を見る。
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
2 週間前
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
04-22-2025 06:38 PM
カタログ変数の日付変数に対してデフォルト値を1か月後の日付を設定するにスクリプトに書くことで可能になります。
デフォルト値に入力するスクリプト
javascript:
var dateNextMonth;
var gdt = new GlideDateTime();
gdt.addMonths(1);
dateNextMonth = gdt.getDate();
dateNextMonth;
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
04-22-2025 08:39 PM
something like this in the default value of the date variable
javascript: var dt; var gdt = new GlideDateTime(); gdt.addMonthsLocalTime(1); dt = gdt.getDate(); dt;
If it's date/time then use this
javascript: var dt; var gdt = new GlideDateTime(); gdt.addMonthsLocalTime(1); dt = gdt.getValue(); dt;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
2 週間前
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader