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
MGBC
07/25/2023, 6:40 PM
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
MGBC
07/25/2023, 6:40 PM
Then use standard field sourcing to source those values into a custom transaction line field.
MGBC
07/25/2023, 6:41 PM
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
Marc
07/25/2023, 6:50 PM
It’s a good idea @MGBC
m
MGBC
07/25/2023, 7:51 PM
Actually after thinking about this more you could probably do without scripting
MGBC
07/25/2023, 7:51 PM
By using saved searches and possibly a workflow
MGBC
07/25/2023, 7:56 PM
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
MGBC
07/26/2023, 4:43 AM
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