+ 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