function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
azhar khasimazhar khasim 

Need help for my validation rule for the below one!!

I had a validation rule for which i was using to restrict as

If LOI Approval Status picklist value = Approved then only update the IsRenewed Chechbox = True.
*******************
If LOI Approved Status picklist value = (Rejected or Submitted) we don't want to make the IsRenewed checkbox to true.

*******************
Validation Rule:

 ISPICKVAL(LOI_Approval_Status__c, Approved) 

Please give me a solution for this 

Thanks and Regards,
Azar Khasim.
Best Answer chosen by azhar khasim
azhar khasimazhar khasim
Hello Rana,

I fixed the issue. its worked.

Actually i remorved the IF Function in it.
Like below

AND(ISPICKVAL(LOI_Approval_Status__c,'Submitted'), IsRenewed__c = TRUE)
||
AND(ISPICKVAL(LOI_Approval_Status__c , 'Rejected'), IsRenewed__c = TRUE)


But thanks for Skeleton form of validation rule.
I made tests and found it 
Thank you for your help.

Thanks and Regards,
Azar Khasim.

All Answers

Foram Rana RForam Rana R
Hi Azhar,

I hope you are doing well .....!!
Please use the below code:

IF( AND( ISPICKVAL( Active__c , 'No'), Match_Billing_Address__c = false ) ,true , false)

Here Active__c  is picklist field and 'No' is picklist value.
Match_Billing_Address__c is check that we want it enable if Active__c  is No 
You can edit according to your requirement.
​​​​​​​

Hope this helps you.
Let me know you review or if you have ant query.
If this helps kindly mark it as solved so that it may help others in the future.

Thanks & Regards,
Foram Rana


 
azhar khasimazhar khasim
Hello Foram Rana,

Thanks for the response.
But it is not working for my requirement.

LOI Approval Status is Picklist Filed
IsRenewed is Chechbox Filed.

IF( AND( ISPICKVAL( LOI_Approval_Status__c, 'Approved'), IsRenewed__c= true ) ,true , false)
********************************************
In this requirement 
only when LOI Approval Status = Approved then only we can update IsRenewed = True. 
This is Working.
***********************************************
But this is not working for the above validation rule.
If LOI Approval Status = Submitted or Rejected 
then restrict the access to update IsRenewed = True.
**********************************************

Please provide a solution for thisss...

Thanks and Regards,
Azar Khasim.


 
azhar khasimazhar khasim
Hello Rana,

I fixed the issue. its worked.

Actually i remorved the IF Function in it.
Like below

AND(ISPICKVAL(LOI_Approval_Status__c,'Submitted'), IsRenewed__c = TRUE)
||
AND(ISPICKVAL(LOI_Approval_Status__c , 'Rejected'), IsRenewed__c = TRUE)


But thanks for Skeleton form of validation rule.
I made tests and found it 
Thank you for your help.

Thanks and Regards,
Azar Khasim.
This was selected as the best answer