• Nae 88101
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
 I have set up the following formulla in Accounts:
 
AND (
OR(BillingCountry = "US", BillingCountry="USA", LEN(BillingCountry)=0),
OR(
LEN(BillingState) < 2,
NOT(
CONTAINS("AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:" &
"IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:" &
"NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:" &
"WA:WV:WI:WY", BillingState)
)))
 
 
My problem is when my users attempt to convert a  lead  (company  is non existant) it gives the following error:      
Error: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, A valid two-letter state code is required.: [BillingState] (System Code)
 
Which is triggerd by the formula above.  Is there any way to leave the formula in place but still be able to convert the lead?