How to fix it

  1. Open your browser's Developer Tools (F12) and check the Console tab for JavaScript errors when the widget loads.
  2. Navigate to System Logs > System Log > All and filter by your widget name to check for server-side script errors.
  3. If errors are found, go to Service Portal > Widgets, open your widget, and review the Server script for syntax errors, undefined variables, or missing try-catch blocks.
  4. Add debugging to your server script by inserting gs.log('Debug: ' + JSON.stringify(data), 'WidgetDebug') before the final data assignment to verify what data is being created.
  5. Test your GlideRecord query independently by running it in System Definition > Scripts - Background to verify it returns expected records.
  6. In the widget's Client controller, add console.log('Client data:', $scope.data) to verify the data object is reaching the client side correctly.
  7. Check ACL permissions by navigating to System Security > Access Control (ACL) and filtering by your target table name to ensure portal users have read access.
  8. If ACLs are blocking access, either modify the ACL conditions or ensure your portal user has the required roles listed in the ACL's Requires role field.
  9. Review the widget's Option Schema and ensure default values match what your server script expects, particularly for required parameters.
  10. Verify your HTML template references data.propertyName correctly and matches the property names assigned in your server script.
  11. Clear your browser cache and refresh the portal page to ensure you're seeing the latest widget version.
💡

Quick verification: Add gs.log('Widget loaded successfully', 'WidgetTest') at the end of your server script, then check System Logs to confirm the script executes completely without errors.