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
lincylincy 

Stopping from adding Quote line items

i am not surr what is stopping me to add QLI in this formula.

I have a entry code field i am trying a validation rule which says that it should contain only 7 numbers and adding user bypass and null check to it.But the formula is not working can any one suggest the fix.entry_code is a text(30) data type.

OR(AND($User.BypassValidation__c
NOT(ISNUMBER(entry_code__c)),
AND(ISNUMBER(entry_code__c)),
LEN(entry_code__c)<>7),(OR(entry_Code__c!="|| entry_Code__c!=NULL))
Best Answer chosen by lincy
VinayVinay (Salesforce Developers) 
Hi Lincy,

Try below snippet and it should work.
 
AND($User.BypassValidation__c, (OR(LEN(entry_code__c) <> 7, NOT(ISNUMBER(entry_code__c)))))

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Lincy,

Try below snippet and it should work.
 
AND($User.BypassValidation__c, (OR(LEN(entry_code__c) <> 7, NOT(ISNUMBER(entry_code__c)))))

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
This was selected as the best answer
lincylincy
Thanks vinay.
But i want to add a null check to this formula i have added in the formula above but its not working.
Any help in adding the null check in the answer which you have provided