Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
State enumeration
For those who are realizing that passing a lead will fail if you use a standard two letter code, here's my PHP array for converting them into the proper entity.
[PHP]
//Convert state to an enumerated value
$states = Array(
"AL" => "_alabama",
"AK" => "_alaska",
"AB" => "_alberta",
"AR" => "_arizona",
"AZ" => "_arkansas",
"BC" => "_britishColumbia",
"CA" => "_california",
"CO" => "_colorado",
"CT" => "_connecticut",
"DE" => "_delaware",
"DC" => "_districtOfColumbia",
"FL" => "_florida",
"HI" => "_hawaii",
"ID" => "_idhao",
"IL" => "_illinois",
"IN" => "_indiana",
"IA" => "_iowa",
"KS" => "_kansas",
"KY" => "_kentucky",
"LA" => "_louisiana",
"ME" => "_maine",
[PHP]
//Convert state to an enumerated value
$states = Array(
"AL" => "_alabama",
"AK" => "_alaska",
"AB" => "_alberta",
"AR" => "_arizona",
"AZ" => "_arkansas",
"BC" => "_britishColumbia",
"CA" => "_california",
"CO" => "_colorado",
"CT" => "_connecticut",
"DE" => "_delaware",
"DC" => "_districtOfColumbia",
"FL" => "_florida",
"HI" => "_hawaii",
"ID" => "_idhao",
"IL" => "_illinois",
"IN" => "_indiana",
"IA" => "_iowa",
"KS" => "_kansas",
"KY" => "_kentucky",
"LA" => "_louisiana",
"ME" => "_maine",
0