Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.

Hello,

 

I'm helping out trying to create a validation rule on the Case object. What we're looking to do is trigger a rule when:

 

  • not new
  • a specific case record type
  • a lookup field is blank
  • the case status had a prior value of 'New'

We have case statuses of: New -> In Progress -> Review, etc. If the prior value is New and changed to In Progress, the validation rule will trigger if the lookup field is blank.

 

Here's the issue: The validation rule works for existing case records but when trying to create a new case with this record type with a 'New' status, I get an error that states a case process failed because of the custom field validation.

 

Here is my formula:

 

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

답변 3개
  1. 2022년 4월 26일 오후 3:13

    Thank you @Steve Molis and @Keiji Otsubo for responding. I was able to resolve my issue by adjusting the error condition formula. I ended up removing the PRIORVALUE function from the formula and focused on the statuses that would trigger the rule:

     

    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 ))

로딩 중
0/9000