Levi Pruss
12/22/2025, 4:48 PMCeligo AI
12/22/2025, 4:48 PMAI generated answer (using internal Slack threads):In NetSuite workflows, you can set conditions to compare a date field to today's date or a date before today. Here are some suggestions based on the conversations: 1. Using a Formula in the Workflow Transition: You can use a formula in the workflow transition to compare the custom date field with today's date. For example, for a transition to State 2 (if the custom date field is today or before today), you can use the formula:
ROUND({today}-{customdatefield})<1. For a transition to State 3 (if the custom date field is after today), you can use the formula: ROUND({today}-{customdatefield})>=1. However, it seems there might be some issues with this approach as it was reported to always transition to State 2 regardless of the date.
2. Using a Workflow Field: Another approach is to create a workflow field called 'date variance'. Then use a 'Set Field Value' action with a formula of {today} - {customdatefield}. In your transition, you can use the visual builder to say {wf_datevariancefield} is less than 1. This way, you are evaluating a single numerical field instead of trying to do a calculation of two fields in the formula.
3. Using a Saved Search: You can create a saved search with the criteria you want and then use that as the condition of your transition. This approach was suggested as an alternative to writing the condition in the workflow.
4. Using Client-Side Scripting: If you are working with client-side fields, you might need to use JavaScript conditions. For example, you can use nlapiStringToDate(nlapiGetFieldValue('trandate')).getTime() < new Date().getTime() to compare the 'trandate' field with today's date.
Remember to test your conditions thoroughly to ensure they work as expected.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
12/22/2025, 4:48 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837219417
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83215338
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827453673
Celigo AI
12/22/2025, 4:48 PM