AND( NOT(Star_Job_Project__c ='Technology Product Sales'))

This validation rule is on Time Entry Object in which if STAR Job API - Star_Job_Project__c is equal to Technology Product Sales then that particular record will block.

My issue is the above validation rule is working in every record I only want for specific condition.

User can edit if star job is equal to any other value but if the value is Technology Product Sales the record should block.

Can anyone help in the above validation?

  • If you want the validation to only fail when Its value is Technology Product Sales you should take out the NOT () from the validation rule formula. Also the AND isn't doing anything at all so your validation rule could be Star_job_project__c = 'Technology Product Sales' Commented Oct 15, 2018 at 7:40

1 Answer 1


You write validation rules that prevent record from being created. Write conditions that prevent. So if your condition is true - record creation would be stopped. In your current condition

AND( NOT(Star_Job_Project__c ='Technology Product Sales'))

record creation will be stopped if Star_Job_Project__c not equals to 'Technology Product Sales'

so according to your requirement correct formula is

Star_Job_Project__r.Name ='Technology Product Sales'
  • Star_Job_Project__c ='Technology Product Sales' This validation rule is not working as per my requirement. According to my requirement when Star JOB is equal to "Technology Product Sales" no one can go and edit the records so need to write a validation rule if someone click edit and change the record it shows an error message. with above validation rule i am able to edit and make changes and then save the records.
    – Ravina
    Commented Oct 15, 2018 at 8:39
  • If i use this, Star_Job_Project__c ='Technology Product Sales' And to test this is opened the record with the above condition and make changes and save the record then i am able to save the record. Again my requirement is to prevent users to edit the record if Star_Job_Project__c ='Technology Product Sales' will met the criteria. So the record should block.
    – Ravina
    Commented Oct 15, 2018 at 8:46
  • @Ravina what type of field is Star_Job_Project__c ? Commented Oct 15, 2018 at 8:52
  • @ Oleksandr Field Name - Star Job API Name -Star_Job_Project__c Lookup field on Project .
    – Ravina
    Commented Oct 15, 2018 at 8:56
  • lookup field on Project object
    – Ravina
    Commented Oct 15, 2018 at 8:57

You must log in to answer this question.

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