Muokkaa

Jaa


formContext.data.process (Client API reference)

Provides events, methods, and objects to interact with the business process flow data on a form. See formContext.ui.process (Client API reference) for methods to interact with the business process flow control on the form.

Process events and event handler methods

Use the following events and event handler methods to write scripts for business process flows.

Event Event handler methods
OnPreProcessStatusChange addOnPreProcessStatusChange
removeOnPreProcessStatusChange
OnProcessStatusChange addOnProcessStatusChange
removeOnProcessStatusChange
OnPreStageChange addOnPreStageChange
removeOnPreStageChange
OnStageChange addOnStageChange
removeOnStageChange
OnStageSelected addOnStageSelected
removeOnStageSelected

Active Process methods

Use these methods to retrieve information about the active process and set a different process as the active process.

Name Description
getActiveProcess Returns a Process object representing the active process.
setActiveProcess Sets a Process as the active process.

Process methods

A process contains the data for a business process flow. Use the methods to access properties of the process.

Name Description
getId Returns the unique identifier of the process.
getName Returns the name of the process.
getStages Returns a collection of stages in the process.
isRendered Returns a boolean value indicating whether the process is rendered.

ProcessInstance methods

Use these methods to retrieve information about all the process instances for a record and to set a process instance as the active instance.

Name Description
getProcessInstances Returns all the process instances for the table record that the calling user has access to.
setActiveProcessInstance Sets a process instance as the active instance.

Instance methods

A process instance contains the data for an instance of the business process flow. Use the methods to access properties of the process instance.

Name Description
getInstanceId Returns the unique identifier of the process instance.
getInstanceName Returns the name of the process instance.
getStatus Returns the current status of the process instance.
setStatus Sets the current status of the active process instance.

Active Stage methods

Use these methods to retrieve information about the active stage and set a different stage as the active stage.

Name Description
getActiveStage Returns a Stage object representing the active stage.
setActiveStage Sets a completed stage as the active stage.

Stage methods

A stage contains the data for a stage in a business process flow. Use the methods to access properties of the stage.

Name Description
getCategory Returns an object with a getValue method which will return the integer value of the business process flow category.
getEntityName Returns the logical name of the table associated with the stage.
getId Returns the unique identifier of the stage.
getName Returns the name of the stage.
getNavigationBehavior Returns a navigation behavior object for a stage that can be used to define whether the Create button is available for users to create other table record in a cross-table business process flow navigation scenario.
getStatus Returns the status of the stage.
getSteps Returns a collection of steps in the stage.

Step methods

A step contains the data for a step in a stage in a business process flow. Use the methods to access properties of the step.

Name Description
getAttribute Returns the logical name of the column associated to the step.
getName Returns the name of the step.
getProgress Returns the progress of the action step.
isRequired Returns a boolean value indicating whether the step is required in the business process flow.
setProgress Updates the progress of the action step.

Use these methods to move to next and previous stages. Both these methods will cause the OnStageChange event to occur.

Name Description
moveNext Progresses to the next stage.
movePrevious Moves to the previous stage.

Other useful methods

Use these methods to find information about the stages in the active path, enabled processes, and selected stage.

Name Description
getActivePath Gets a collection of stages currently in the active path with methods to interact with the stages displayed in the business process flow control.
getEnabledProcesses Asynchronously retrieves the business process flows enabled for a table that the current user can switch to.
getSelectedStage Gets the currently selected stage.

formContext.ui.process (Client API reference)
Understand Xrm object model
Controls (Client API reference)