Hello MY Lovely Group of People! :slightly_smiling...
# general
g
Hello MY Lovely Group of People! 🙂 Can anyone help me with a solution In NetSuite to deal with NetSuite volatile organic compounds. is there a way I can prevent an item to sell in one state. and not in another? Seems like California, and the most annoying. If I get some help I will contribute a HUGE chuck of time answering questions in this Group. Thanks! 🙂
m
You could probably do this via a script fairly easily. Just add a custom field to the Item Record called "do not sell in states". Make it a multi select field and set it for items that have these restrictions
Then use standard field sourcing to source those values into a custom transaction line field.
Then use a Client script to compare the Ship To state to the value(s) in that custom line field and display an Error dialog or Message error to the user saying "These items cannot ship to this state"
m
It’s a good idea @MGBC
m
Actually after thinking about this more you could probably do without scripting
By using saved searches and possibly a workflow
Create the custom item field I mentioned above. Then make a saved search on sales order with mainline false Add a formula text with the formula NS_CONCAT(DISTINCT(CASE WHEN {shippingstate} IN({item.donotshiptostate}) THEN {item} END)) With a summary of MAX Then use that saved search to source a custom body field on the SO
Then you can use that field in conditions to trigger emails, Confirm or Return User Error action, or even populate an Inline HTML field like a banner message at the top of the SO