ログインユーザーのセグメントに応じて Business Application の参照候補を絞り込む方法
オプション
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
3 時間前
カタログアイテムの変数(参照タイプ)で cmdb_ci_business_appテーブルを参照先にするのですが、
参照時にリストされる内容は、ログインユーザーのsys_userテーブル上にある「segment description」というカラムが「 AAA」の場合には、cmdb_ci_business_appテーブルの「Owning organization」というカラムが「AAA」のものだけ表示されるようするにはどういう設定で実現できますか?
1件の返信1
オプション
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
2 時間前
something like this but please enhance, this should work in both scope app + global scope
Note: I assume both the fields 1 that is on sys_user and other on cmdb_ci_business_app are of same type
javascript:
var query = '';
var val = '';
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", gs.getUserID());
gr.query();
if (gr.next()) {
val = gr.owningFieldName.toString();
}
query = 'owning_organization=' + val;
query;
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
