Interface for the formContext.data.process API.

Hierarchy

Methods

  • Use this to add a function as an event handler for the OnPreProcessStatusChange event so that it will be called before the business process flow status changes.

    Parameters

    • handler: Xrm.Events.ProcessStatusChangeHandler

      The function will be added to the bottom of the event handler pipeline. The execution context is automatically set to be the first parameter passed to the event handler. Use a reference to a named function rather than an anonymous function if you may later want to remove the event handler.

    Returns void

  • Use this to add a function as an event handler for the OnPreStageChange event so that it will be called before the business process flow stage changes.

    Parameters

    • handler: StageChangeEventHandler

      The function will be added to the bottom of the event handler pipeline. The execution context is automatically set to be the first parameter passed to the event handler. Use a reference to a named function rather than an anonymous function if you may later want to remove the event handler.

    Returns void

  • Use this to add a function as an event handler for the OnPreProcessStatusChange event so that it will be called when the business process flow status changes.

    Parameters

    • handler: Xrm.Events.ProcessStatusChangeHandler

      The function will be added to the bottom of the event handler pipeline. The execution context is automatically set to be the first parameter passed to the event handler. Use a reference to a named function rather than an anonymous function if you may later want to remove the event handler.

    Returns void

  • Use this to add a function as an event handler for the OnStageChange event so that it will be called when the business process flow stage changes.

    Parameters

    • handler: StageChangeEventHandler

      The function will be added to the bottom of the event handler pipeline. The execution context is automatically set to be the first parameter passed to the event handler. Use a reference to a named function rather than an anonymous function if you may later want to remove the event handler.

    Returns void

  • Use this to add a function as an event handler for the OnStageSelected event so that it will be called when a business process flow stage is selected.

    Parameters

    • handler: Xrm.Events.ContextSensitiveHandler

      The function will be added to the bottom of the event handler pipeline. The execution context is automatically set to be the first parameter passed to the event handler. Use a reference to a named function rather than an anonymous function if you may later want to remove the event handler.

    Returns void

  • Use this method to get a collection of stages currently in the active path with methods to interact with the stages displayed in the business process flow control. The active path represents stages currently rendered in the process control based on the branching rules and current data in the record.

    Returns ItemCollection<Xrm.ProcessFlow.Stage>

    A collection of all completed stages, the currently active stage, and the predicted set of future stages based on satisfied conditions in the branching rule. This may be a subset of the stages returned with formContext.data.process.getActiveProcess because it will only include those stages which represent a valid transition from the current stage based on branching that has occurred in the process.

  • Returns a Stage object representing the active stage.

    Returns Xrm.ProcessFlow.Stage

    current active stage.

  • Use this method to asynchronously retrieve the enabled business process flows that the user can switch to for an entity.

    Parameters

    • callbackFunction: ((enabledProcesses) => void)

      The callback function must accept a parameter that contains an object with dictionary properties where the name of the property is the Id of the business process flow and the value of the property is the name of the business process flow. The enabled processes are filtered according to the user’s privileges. The list of enabled processes is the same ones a user can see in the UI if they want to change the process manually.

    Returns void

  • Use this method to get the unique identifier of the process instance

    Returns string

    The unique identifier of the process instance

  • Use this method to get the name of the process instance

    Returns string

    The name of the process instance

  • Returns all process instances for the entity record that the calling user has access to.

    Parameters

    Returns void

  • Use this method to get the currently selected stage.

    Returns Xrm.ProcessFlow.Stage

    The currently selected stage.

  • Progresses to the next stage.

    Parameters

    Returns void

  • Moves to the previous stage.

    Parameters

    Returns void

  • Use this to remove a function as an event handler for the OnPreProcessStatusChange event.

    Parameters

    Returns void

  • Use this to remove a function as an event handler for the OnPreStageChange event.

    Parameters

    • handler: StageChangeEventHandler

      If an anonymous function is set using the addOnPreStageChange method it cannot be removed using this method.

    Returns void

  • Use this to remove a function as an event handler for the OnProcessStatusChange event.

    Parameters

    Returns void

  • Use this to remove a function as an event handler for the OnStageChange event.

    Parameters

    • handler: StageChangeEventHandler

      If an anonymous function is set using the addOnStageChange method it cannot be removed using this method.

    Returns void

  • Use this to remove a function as an event handler for the OnStageChange event.

    Parameters

    • handler: StageSelectedEventHandler

      If an anonymous function is set using the addOnStageChange method it cannot be removed using this method.

    Returns void

  • Set a Process as the active process.

    Parameters

    • processId: string

      The Id of the process to make the active process.

    • Optional callbackFunction: Xrm.ProcessFlow.ProcessCallbackDelegate

      (Optional) a function to call when the operation is complete.

    Returns void

  • Sets a process instance as the active instance

    Parameters

    • processInstanceId: string

      The Id of the process instance to make the active instance.

    • Optional callbackFunction: Xrm.ProcessFlow.SetProcessInstanceDelegate

      (Optional) a function to call when the operation is complete.

    Returns void

  • Set a stage as the active stage.

    Parameters

    • stageId: string

      the Id of the stage to make the active stage.

    • Optional callbackFunction: Xrm.ProcessFlow.ProcessCallbackDelegate

      (Optional) a function to call when the operation is complete.

    Returns void

  • Use this method to set the current status of the process instance

    Parameters

    Returns void

Generated using TypeDoc