Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UIポリシーの読み取り専用に必須をつける設定をしたい

yukarif
Giga Contributor

コミュニティの皆様

 

UIポリシーで教えてほしいです。

読み取り専専用且つ必須という設定をつけたいのですが、1つのUIポリシーに以下の設定をしています。

【カタログUIポリシーアクション】

A変数 読み取り専用 True

 

【スクリプト】

「trueの場合に値を返す」に以下を設定

function onCondition() {
    g_form.setMandatory('A変数',true);
}

この設定では「必須」のみUIポリシーの設定が働くのですが読み取り専用にはなりません。
以前は必須且つ読み取り専用の設定が可能だったと思いますがバージョンアップで上記の設定が
できなくなってしまったのか教えてほしいです。よろしくお願いします。
1 件の受理された解決策

Chaitanya ILCR
Mega Patron

Hi @yukarif ,

 

A field( or a Variable) cannot be be mandatory and read-only at the same time.

how can a user can enter a value if the field is read only?

 

what's the business requirement?

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

元の投稿で解決策を見る

3件の返信3

Chaitanya ILCR
Mega Patron

Hi @yukarif ,

 

A field( or a Variable) cannot be be mandatory and read-only at the same time.

how can a user can enter a value if the field is read only?

 

what's the business requirement?

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Ankur Bawiskar
Tera Patron
Tera Patron

@yukarif 

I agree with what @Chaitanya ILCR 

Please share your business requirement.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

yukarif
Giga Contributor

Chaitanya様

早急に回答ありがとうございます。
必須かつ読み取り専用の設定ができないとの事でわかりました。

ビジネス要件は、申請登録後にメールアドレス不備が
あり通知が届かないという要件に対してテーブルに登録された情報として
現行のメールアドレスを表示する場合に読み取り専用かつ必須にしたいというのが
あります。

仕様上できないというので現行のメールアドレスと変更用のメールアドレスを
分けて対応しようと思います。

仕様としてできないというのでこの問題自体は解決できたので助かりました!
ありがとうございました!