Scenario

form.clientScriptFilePath is used in User Event for loading a client script under record view event. The error occurs when view event is fired.

Steps to Locate the Bug

  1. the file path is correct, which is proven by referencing the client script file in define[] without a problem
  2. set the file path to a wrong value, the error shows MODULE DOES NOT EXIST but with the given wrong file path

Solution

use form.clientScriptFileId instead


场景

在User Event中的VIEW阶段使用了form.clientScriptFilePath。当view事件触发时,报这个错误。

定位bug的步骤

  1. define[] 中引用client脚本是没有报错的,所以文件路径肯定对的
  2. 把文件路径故意改错,MODULE DOES NOT EXIST的错误信息会包含已有的client脚本文件的路径错误。

解决

form.clientScriptFileId 作为代替方案

Last modified: 28/09/2022

Author

Comments

Write a Reply or Comment

Your email address will not be published.