0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

salesforce ISNEW 式 の覚え

Last updated at Posted at 2020-03-05

Answersで回答する時に使う情報のまとめに戻る

私もはまってしまった。いい解説をしてくれています。

OR(
ISNEW(), 
ISCHANGED(Date_Sourced__c)
),

ISNEW if most obvious, it detects that the RECORD is new, not the value of the field etc.
ISCHANGED checks that the field is change from previous to now and returns TRUE. But when we have a new record, ISCHANGED by itself returns FALSE. Basically, it has no previous value to compare.
So the check is IF its new OR the field DateSource is changed - this will cover both scenarios.

ISNEW最も明白な場合は、フィールドの値などではなく、RECORDが新しいことを検出します。
ISCHANGEDは、フィールドが以前から現在に変更されていることを確認し、TRUEを返します。ただし、新しいレコードがある場合、ISCHANGED自体はFALSEを返します。基本的に、比較する以前の値はありません。
したがって、チェックは、新しいか、フィールドDateSourceが変更されたかどうかです。これは、両方のシナリオをカバーします。

Validation Rule not working on ISNEW() but works on ISCHANGED

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?