• Angela Pellegrino 9
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to write a VR that prevents a case from being closed if it's not owned by a user. It also include several other statements that should apply.  It should fire with any RT with any of the closed statuses listed but it's not.  Any assistance is greatly appreciated! Thank you!


AND
(
NOT($Setup.Global_System_Flags__c.Disable_Validation_Rules__c),
NOT CONTAINS(Source:EmailMessage.FromAddress, "@greenhouse.io"),
LEFT(OwnerId,3) <> '005',

AND(
OR(
(RecordType.Name = 'A'),
(RecordType.Name = 'B'),
(RecordType.Name = 'C'),
(RecordType.Name = 'D'),
(RecordType.Name = 'E'),
(RecordType.Name = 'E')),

OR
(
ISPICKVAL(Status, 'Closed'),
ISPICKVAL(Status, 'Duplicate'),
ISPICKVAL(Status, 'Canceled'),
ISPICKVAL(Status, 'Resolved'),
ISPICKVAL(Status, 'Reassigned')
)
)
)
I am trying to write a VR that prevents a case from being closed if it's not owned by a user. It also include several other statements that should apply.  It should fire with any RT with any of the closed statuses listed but it's not.  Any assistance is greatly appreciated! Thank you!


AND
(
NOT($Setup.Global_System_Flags__c.Disable_Validation_Rules__c),
NOT CONTAINS(Source:EmailMessage.FromAddress, "@greenhouse.io"),
LEFT(OwnerId,3) <> '005',

AND(
OR(
(RecordType.Name = 'A'),
(RecordType.Name = 'B'),
(RecordType.Name = 'C'),
(RecordType.Name = 'D'),
(RecordType.Name = 'E'),
(RecordType.Name = 'E')),

OR
(
ISPICKVAL(Status, 'Closed'),
ISPICKVAL(Status, 'Duplicate'),
ISPICKVAL(Status, 'Canceled'),
ISPICKVAL(Status, 'Resolved'),
ISPICKVAL(Status, 'Reassigned')
)
)
)