Skip to main content
Version: 1.0

View Actions

Important

View Actions are not supported in CompuTec WebUp 1.2610.2 and later. This page describes View Actions in earlier versions.

In version 1.2610.2 and later, use Smart Actions.

View Actions in CompuTec WebUp Manager let you define logic that runs when specific document events occur in the SAP Business One Web Client, such as when a document is added or updated.

A View Action can run before or after the document event and is processed by CompuTec AppEngine. This makes View Actions useful for document-level processes, such as validation or automation.

For example, you can use a View Action to check whether required information is provided before a user updates a Sales Order.

With View Actions, key users and administrators can extend standard SAP Business One Web Client behavior without modifying SAP core objects or source code.

info

View Actions are not supported in CompuTec WebUp 1.2610.2 and later. When you update to this version, CompuTec WebUp automatically converts your View Actions to Smart Actions and connects them to the same events. This page describes View Actions in earlier versions.

Note

You can access each CompuTec WebUp function from the CompuTec WebUp Side Panel inside the SAP Business One Web Client. Features open only if the current SAP Business One screen supports extensibility.

Main sections of CompuTec WebUp View Actions​

The View Actions interface in CompuTec WebUp Manager has three main sections:

  • Details: Here you’ll find the unique code of your action and a place to type its name. Here you can also make your action active or deactivate it.

    CompuTec WebUp Manager Details panel showing an active View Action named “Warning- Contact Person is empty” with code AC-00006.

  • Triggers: You can choose to activate your action Before or After following triggers: On Update, On Add, On Cancel or On Close.

    View Action trigger settings for choosing whether an action runs before or after a document event.

  • Action Script: Use this area to enter or paste JavaScript code that defines the action logic. The Parameter Helper provides information about the parameters available for the action, helping you use data from the current SAP Business One context in your script.

    View Action script editor with the Parameter Helper for referencing SAP Business One context data.

info

Each control in SAP Business One Web Client has its Global Unique Identifier (GUID). You can copy it and use it in the script during the View Actions creation to precisely reference a control in your SAP Business One interface.
To reference controls precisely when building actions, you can use the Select Control tool, the right-click Inspect Element or Copy GUID options.

CompuTec WebUp control management interface showing options for selecting a control and copying its GUID.

Key features of CompuTec WebUp View Actions​

Validations​

You can create validations that are triggered Before or After a user updates, adds, cancels or closes a document, field or control.

The validations can include a custom popup message box if you want to ask for confirmation, warn the user, or guide them before the action continues.

▶ Watch: CompuTec WebUp - Validation - Creating a Warning Prompt

Validations use case​

You can create a warning prompt when a user doesn’t add a project name when updating the sales order. Here’s how to do this step by step:

  1. Log in to your SAP Business One Web Client account.

  2. Enter the document you want to work with. In our example it’s Sales Oder.

  3. In CompuTec WebUp Manager extension panel, navigate to View Details.

    note

    You must be logged in to your CompuTec AppEngine account to access the CompuTec WebUp browser extension.

  4. Click Add Action.

    CompuTec WebUp Manager with the Add Action option for creating a View Action.

  5. Enter the action details.

    View Action details form for entering the action name and settings.

  6. Choose the trigger for your action. In our case, we choose Before in the On Update trigger field, because we want to make sure the user won’t save the document without the contact person.

    View Action trigger settings with Before selected for the On Update event.

  7. Now, it’s time to add our script to the Action Script field. In our example, we have a script showing a warning message if a Contact Person field is empty.

    View Action script editor containing a validation for an empty Contact Person field.

  8. Click Save & Preview to confirm.

    View Action setup screen with the Save & Preview option.

  9. Now you can test your action in the preview mode.

    Preview of the View Action validation warning in the SAP Business One Web Client.

  10. If you like how it works, Activate the action.

    View Action screen with the Activate option for enabling the action.

Automations​

You can build JavaScript-based automations that run when specific View events occur.

The automations can perform tasks such as creating documents through the Service Layer, updating field values, or reacting dynamically to changes on the screen.

▶ Watch: CompuTec WebUp - Automation - Creating Activities and Actions