Pattern Pre/Post Scripts in "Discovery and Service Mapping Patterns" scoped app are referencing "script include" accessible only in "Global"DescriptionThere are several Pattern Pre/Post Scripts in "Discovery and Service Mapping Patterns" scoped app which are referencing "script include" accessible only in "Global".As a result, the corresponding pattern using this script will fail during Discovery.Example: Network Switch pattern failed with the error message: "Running pre sensor script- WAPs - Pre failed due to: TypeError: Cannot convert null to an object."This is caused by Pre/Post Pattern Scripts "WAPs - Pre" which is in "Discovery and Service Mapping" scope is referencing to "MakeAndModelJS" and "JSUtil" script includes which are in "Global" scope.Steps to Reproduce Install Discovery and Service Mapping patterns version 1.0.63.Run Discovery on Wireless Access Point devices.Observe that the Network Switch pattern failed with the error message: "Running pre sensor script- WAPs - Pre failed due to: TypeError: Cannot convert null to an object."WorkaroundThis problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this form to be notified when more information will become available.. If you can not wait to upgrade to the release version containing the fix, you can use the following steps to solve the issue (based on WAPs - Pre example): Change the "Accessible from" flag on JSUtil and MakeAndModelJS from "This application scope only" to "All application scopes".Modify the Pattern Pre/Post Scripts "WAPs - Pre" by adding "global." in front of the occurrences of "JSUtil" and "MakeAndModelJS".Related Problem: PRB1409305