JS Client API
  • Getting Started
  • Rule Engine Unique Functions
  • Custom Form Window Functions
  • Use Cases & Code Samples
  • Known Issues
  • Retrieving Data
    • Retrieving Standard Resources
    • Retrieving User Defined Tables
    • Retrieving Attachments
    • Retrieving Items in Transaction Scope
    • Retrieving Transaction Lines
    • ADAL
  • Updating Data
    • Adding Objects to Standard Resources
    • Updating Standard resources
    • Updating User Defined Table
    • Updating Items in Transaction Scope
    • Adding Transaction Lines
    • Removing Transaction Lines
Powered by GitBook
On this page

Custom Form Window Functions

PreviousRule Engine Unique FunctionsNextUse Cases & Code Samples

Last updated 17 days ago

Was this helpful?

CtrlK
  • Overview
  • Custom Form Window Functions

Was this helpful?

Overview

This guide describes the functions available in the Pepperi JS Client Side API that manage the user experience of Custom Web Forms within Workflows. These functions control the closing, canceling, and saving of forms, with notes on deprecated usage.


Custom Form Window Functions

window.pepperiApp.onClose()

  • Description: Closes the Custom Web Form window without affecting the Workflow status.

  • Use Case: Use this to exit the form when no changes need to be preserved or canceled.

  • Syntax:

    window.pepperiApp.onClose();

window.pepperiApp.onCancel()

  • Description: Closes the Custom Web Form window and cancels the Workflow, reverting to the previous status.

  • Use Case: Ideal for discarding changes and undoing the current Workflow step.

  • Syntax:

    window.pepperiApp.onCancel();

window.pepperiApp.onSaveAndClose()

  • Description: Closes the Custom Web Form window and saves changes applied to the Workflow object (deprecated).

  • Use Case: Use this only if relying on the deprecated Workflow object to persist modifications.

  • Syntax:

    window.pepperiApp.onSaveAndClose();
  • Note: The Workflow object is deprecated; consider modern alternatives for new implementations.