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
Ken sfdc1Ken sfdc1 

WHy this validation not working ?

AND ( RecordTypeId = '012E0000000NA5U' , ISBLANK ( Date__c ) , ISPICKVAL ( Status , "Completed" ) )
Best Answer chosen by Ken sfdc1
Abhi_TripathiAbhi_Tripathi
try this, its not working becuase of two values you are checking for the picklist
 
AND( RecordTypeId = '012E0000000NA5Q',
OR( ISPICKVAL(Outcome__c ,"Completed",
        ISPICKVAL(Outcome__c ,"Patient has not Started")
      )
  ,ISPICKVAL ( Status , "Closed" )
)
Let me know for further issues

[Note : Don't make Record Type Id hardcoded as in production it will show error, so make it dynamic]

RecordType.Name = "OpprtunityRecordType"
 

All Answers

Ken sfdc1Ken sfdc1
This one is not working?

AND( RecordTypeId = '012E0000000NA5Q',ISPICKVAL(Outcome__c ,"Completed,Patient has not Started"),ISPICKVAL ( Status , "Closed" ))
ManojjenaManojjena
Hi Ken ,


"Completed,Patient has not Started"  This is one value or two value or it Outcome is a mulyiselect picklist ?
 
Ken sfdc1Ken sfdc1
it is a picklist and a single word.
ManojjenaManojjena
Hi Ken,

DO one thing check 

AND(ISPICKVAL(Outcome__c ,"Completed,Patient has not Started"),ISPICKVAL ( Status , "Closed" ))  

If it is working then add record type id 

 
Ken sfdc1Ken sfdc1
nope not working!
ManojjenaManojjena
Hi Ken ,

try with beow formula if it will work then the picklist value  which have comma in the value needs to check .

Still you are facing problem add me in skype my id manojjena19 .I can check .
 
AND(RecordTypeId = '012E0000000NA5Q',ISPICKVAL ( Status , "Closed" ))

 
Abhi_TripathiAbhi_Tripathi
try this, its not working becuase of two values you are checking for the picklist
 
AND( RecordTypeId = '012E0000000NA5Q',
OR( ISPICKVAL(Outcome__c ,"Completed",
        ISPICKVAL(Outcome__c ,"Patient has not Started")
      )
  ,ISPICKVAL ( Status , "Closed" )
)
Let me know for further issues

[Note : Don't make Record Type Id hardcoded as in production it will show error, so make it dynamic]

RecordType.Name = "OpprtunityRecordType"
 
This was selected as the best answer