I have 3 fields, A, B and C, A is a regular select...
# suitescript
m
I have 3 fields, A, B and C, A is a regular select, B is a filtered select by A, and C is a filtered select by B. On A change I have a script that looks up the values for B and C and attempts to set them in order B first then C. However it is only setting B and I feel like its because C hasn’t sourced yet. Is there a way to force C to wait for B before being set?
b
what does your script look like
m
Copy code
if (workTypeId) {
    context.currentRecord.setValue({
        fieldId: 'custrecord_nco_wo_init_job_labor_type',
        value: workTypeId
    });
}

if (workSubtypeId) {
    context.currentRecord.setValue({
        fieldId: 'custrecord_nco_wo_init_job_labor_subtype',
        value: workSubtypeId
    });
}
subtype field is filtered by type field
and it seems to be a timing issue
b
m
that is what i was looking for but somehow didnt find it in the docs, it used to be the 4th param in 10
thank you!