0

I have created the below validation rule but when saving it shows Error: Syntax error. Found ')'
Can someone help me identify what I am missing

OR(
AND(
$User.Full_Name__c <> "Case Guest User",
$UserRole.Name <> "CAN-SFISVC",
ISCHANGED(FIRST_CONTACT_RESOLUTION__c),
FIRST_CONTACT_RESOLUTION__c = true,
),
AND(
DATEVALUE(CreatedDate) <> TODAY(),
TEXT(Status) = 'Reopened',
Ownership_Change_Count__c > 0,
OwnerShip_Change_Count_Queue__c > 0,
Case_Re_open_Count__c > 0
)
)

Many thanks

1 Answer 1

2

Try removing , at the end in the line FIRST_CONTACT_RESOLUTION__c = true in first AND() condition as below

OR(
AND(
$User.Full_Name__c <> "Case Guest User",
$UserRole.Name <> "CAN-SFISVC",
ISCHANGED(FIRST_CONTACT_RESOLUTION__c),
FIRST_CONTACT_RESOLUTION__c = true
),
AND(
DATEVALUE(CreatedDate) <> TODAY(),
TEXT(Status) = 'Reopened',
Ownership_Change_Count__c > 0,
OwnerShip_Change_Count_Queue__c > 0,
Case_Re_open_Count__c > 0
)
)
3
  • 1
    Thank you. That helped me save the rule. Commented Feb 28, 2023 at 16:10
  • Hello all, So i created the validation rule for 2 requirements which is 1. The above rule should fire for users with Role = CAN-SFISVC where only for this role they should be able to close the case same day as the created date. However The below requirement is not working as expected. 2. The rule should not let users close the case unless its created the same day for that particluar role alone. But the validation rule is letting the same role users close the case next day or day after that which it should not. Can someone help me to figure this out. Much appreciated. Commented Feb 28, 2023 at 16:35
  • @AmandaGreen - you should ask that as a new question; accept swetha's answer
    – cropredy
    Commented Feb 28, 2023 at 19:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .