I need to check that all WorkOrder Service Tasks are complete prior to a Booking be closed in the Field Service Mobile App
I already get one attribute from the Service Tab and set a field required based on some logic which works well
var faultcategory = formContext.ui.tabs.get(3).sections.get(0).controls.get(0).getAttribute("eye_faultcategory").getValue();
however I can't get the gridContext as below it always returns null
var formContext = executionContext.getFormContext();
var gridContext = formContext.getControl("workorderservicetasksgrid");
This is OnSave as well so I don't believe it's due to not being loaded.
Also confirming this is the Bookable Resource Booking form that integrates the WorkOrder form as well.
Any better ideas I was planning to get rows and check all completed.