What steps to make a workflow that prevents an ite...
# ask-stanley-ai
m
What steps to make a workflow that prevents an item being marked inactive if there is any quantity in any location or bin?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To create a workflow that prevents an item from being marked as inactive if there is any quantity in any location or bin, you can follow these steps: 1. Create a new workflow with a record type of 'Inventory Item'. 2. Set the trigger type to 'Before Record Submit'. 3. Add a new state and set it as the initial state. 4. In this state, add a new action of type 'Set Field Value'. 5. Set the field to 'Inactive' and the value to 'F' (False). 6. Set the condition for this action to be when 'Total Quantity on Hand' is greater than 0. This workflow will set the 'Inactive' field to false (i.e., active) whenever there is any quantity on hand, thus preventing the item from being marked as inactive. However, please note that the 'Total Quantity on Hand' field might not always reflect the real-time quantity on hand, especially if you have multiple locations or bins. It might be more accurate to create a saved search that aggregates all on hand quantities across all locations and use this saved search as the condition in your workflow. Also, remember that workflows cannot prevent a record from being saved. They can only change field values or perform actions after the record is saved. If you need to prevent the record from being saved, you might need to use a SuiteScript beforeSubmit User Event Script instead.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830716074
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830322504
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829967141
Please provide your feedback on this answer.