SAP Knowledge Base Article - Public

3785686 - script execution failed if application opened via hyperlink; works when opened directly, SAP analytics cloud

Symptom

  • When the target application is opened via a hyperlink from another report, clicking the Submit button shows errors.
  • Error message: Script execution failed for event 'Button_Submit.onClick'
  • The same application works as expected when opened directly from the tenant (filters, buttons, and interactivity function normally).

Environment

  • Product: SAP Analytics Cloud
  • Unified Story Scripting related Issues

Reproducing the Issue

  1. Open the parent story/report in the tenant.
  2. Use the hyperlink to navigate to the target application (Ask-type report).
  3. Confirm any prompt if shown.
  4. Provide filter values.
  5. Click the Submit button.
  6. Observe the script execution errors.

Cause

Configuration: the hyperlink opens the target application in a viewer mode that does not fully support the application’s scripting, resulting in onClick script errors when using the Submit button.

Resolution

  1. Adjust the hyperlink or URL used to open the target application to force Full Viewer mode.
  2. Append the URL parameter force=app to the target application URL:
              If the URL has no query parameters, append ?force=app.
              If the URL already has query parameters, append &force=app.

Save the change and retest by opening the target application via the hyperlink and clicking Submit.

As an immediate workaround:
open the application directly from the tenant (without using the hyperlink), which also avoids the error.

See Also

refer to: Enabling Lite Viewer Support for Your Custom Widget (Optimized Story Experience)

Keywords

script execution failed, onClick, submit button, Button_Submit_Years, Button_Submit_Yrs_Mnths_Qtrs, hyperlink, open story link, viewer mode, full viewer, lite viewer, optimized story, force=app, scripting error, application designer, SAC , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem

Product

SAP Analytics Cloud 1.0