0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

モジュール:Validation Rules

Last updated at Posted at 2023-12-09

Get Started with Validation Rules

何もしないで検証ボタンを押してみる

We can’t find a Case validation rule named ‘CASE001_Engineering_Req_Numeric’.

作ったけどなぁ

We can’t find a description on the Case validation rule named ‘CASE001_Engineering_Req_Numeric’.

説明に適当に入れたけど

We were unable to insert a Case with a blank Engineering Req Number.

最終的な入力規則

AND(
NOT(ISBLANK( EngineeringReqNumber__c)),
NOT(ISNUMBER(EngineeringReqNumber__c))
)

image.png

Implement Best Practices

何もしないで検証ボタンを押してみる

We can’t find a Lead validation rule named ‘LEAD001_Email_Or_Phone_Required’.

OR(
AND(
ISNEW(),
ISBLANK( Email ),
ISBLANK( Phone )
),
AND(
NOT(ISNEW() ),
ISBLANK( Email ),
ISBLANK( Phone ),
OR(
ISCHANGED(Email ),
ISCHANGED(Phone )
)
)
)

image.png

Bypass Your Validation Rules

何もしないで検証ボタンを押してみる

We can’t find a Custom Permission named ‘Bypass_Case_Validation_Rules’.

We can’t find a permission set with the ‘Bypass_Case_Validation_Rules’ custom permission.

この設定がない?
image.png

We were able to change a Closed case status to Working without the Bypass_Case_Validation_Rules permission.

権限セットに自分を追加したけど、変わらん

We were able to change a Closed case status to Working without the Bypass_Case_Validation_Rules permission.

TEXT(PRIORVALUE(Status)) = "Closed"
だとダメ?

AND(
ISCHANGED( Status),
ISPICKVAL(PRIORVALUE(Status) ,"Closed"),
NOT( $Permission.Bypass_Case_Validation_Rules )
)

image.png

We can’t find a Case validation rule named ‘CASE001_Engineering_Req_Numeric’.

image.png

Restarted browser , again, and got it to work. Browser must have had a cookie pointing to a different org.

ブラウザを再度再起動すると、動作するようになりました。ブラウザには別の組織を指す Cookie が含まれている必要があります。

未分類

Create a Case validation rule:

  • Rule Name: CASE001_Engineering_Req_Numeric

  • Give your validation rule a good description

  • Determine the formula to restrict the Engineering Req Number field (API name EngineeringReqNumber__c) to numeric values if it is populated.

    • Hint: Use ISNUMBER, NOT and ISBLANK functions in your formula.
  • Error Message: Engineering Req Field must be numeric [CASE001]

  • Error Location: Engineering Req Number

Create a validation rule on the Case object

Setup --> Object Manager --> Case --> Validation Rules

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?