ServiceNowDevProgram/example-instancescan-checks

Add check for using setValue()'s displayValue Parameter with Reference Fields

Closed this issue · 3 comments

When using setValue() on a reference field, be sure to include the display value with the value (sys_id). If you set the value without the display value, ServiceNow does a synchronous Ajax call to retrieve the display value for the record you specified. This extra round trip to the server can leave you at risk of performance issues.

More at https://developer.servicenow.com/dev.do#!/guides/tokyo/now-platform/tpb-guide/client_scripting_technical_best_practices

Irston commented

Will attempt to do this.

Hi @Irston
Have you started with this?
If not, I will take it forward.

@niamccash You can assign the issue to me as I have submitted the PR