LoginSignup
0
0

More than 1 year has passed since last update.

PRIORVALUE

Last updated at Posted at 2021-07-01

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

PRIORVALUEを使ったカウントアップ

へぇ、確かにこの方法はできるかもしれない。

PRIORVALUE

この関数は、次の場所でのみ使用できます。
1.割り当てルール
2.入力規則
3.項目自動更新
4.評価条件が [レコードが次の場合にルールを評価: 作成されたとき、および編集されるたび] に設定されている場合はワークフロールール。
5.プロセスビルダーでアクションを実行する数式条件。

I am looking for a way to count the number of times the Active flag changes

選択リストでPRIORVALUEを使う

The formula expression is invalid: Incorrect argument type for function 'PRIORVALUE()'.

AND(
ISPICKVAL([Opportunity].StageName, "Closed Lost") ,
ISCHANGED([Opportunity].StageName ),
ISPICKVAL(PRIORVALUE([Opportunity].StageName), "Contract Signed") 
)

一瞬これと間違えるんですよね。

AND(
ISPICKVAL([Opportunity].StageName, "Closed Lost") ,
ISCHANGED([Opportunity].StageName ),
PRIORVALUE(ISPICKVAL([Opportunity].StageName, "Contract Signed"))
)

PRIORVALUEを新規作成で使った時の注意

これまた意味が分からんかったけど、おそらく新規作成なのに PRIORVALUEを使っていたからエラーになったということだろう。

見た感じ構文的には問題なさそう。

AND ( 
NOT( ISNEW() ),
RecordType.Name = '5500 Support Request', 
ISPICKVAL( PRIORVALUE( Status ), 'New'), 
ISBLANK( Plan__c ) 
) 

結局これにしたらOKだったようです。

AND ( 
NOT ( ISNEW() ), 
RecordType.Name = '5500 Support Request', 
OR( 
ISPICKVAL( Status, 'In Progress'),
ISPICKVAL( Status, 'Review'),
ISPICKVAL( Status, 'Require Additional Info'),
ISPICKVAL( Status, 'Request Complete - Returned to RO'),
ISPICKVAL( Status, 'Closed')
), 
ISBLANK( Plan__c )
)

Validation Rule for a lookup field on the Case object

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