Non-conformance record creation fails validation in QA due to workflow event

We’re experiencing a critical validation failure in our QA environment after updating the non-conformance workflow. Users cannot create new NC records - the system throws a validation error at the submission stage.

The workflow event script was modified to auto-populate certain fields based on the selected department, but now the required field validation is triggering incorrectly. Here’s the error we’re seeing:

ValidationError: Field 'Root_Cause_Category' is required
at WorkflowEvent.validateFields(line 47)
at NCRecord.onCreate(line 203)

The field mapping configuration seems correct in TrackWise Designer, and Root_Cause_Category IS being populated by our script. The validation should pass but it’s failing before the workflow event completes. This is blocking all NC creation in QA and we need to resolve it before our production deployment next week.

I’ve seen this exact issue before. The problem is likely the timing of when your workflow event script executes versus when the validation runs. TrackWise validates required fields BEFORE executing certain workflow events, so if your script is trying to populate Root_Cause_Category in an onCreate event, the validation has already failed.

Check which workflow event type you’re using - is it ‘Before Save’ or ‘After Save’? You need to use a ‘Before Validation’ event or move your field population logic earlier in the process.

Quick addition to what Jen said - double-check your field dependencies in the form configuration. If Root_Cause_Category depends on Department selection, make sure the dependency chain is properly configured in Designer. Sometimes the UI shows the field as populated but the backend validation doesn’t recognize it because the dependency hasn’t fully resolved. You might need to add a slight delay or use a different event trigger altogether.

Thanks Sam! I checked and we’re using an ‘onCreate’ event which I believe fires after validation. That would explain it. Is there a specific event type I should switch to? Also, will changing the event type affect other parts of our workflow logic?