Business Process Flow (BPF) events and event handler methods

 

Business Process Flow events and event handler methods

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

Active Process methods

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

NameDescription
getActiveProcessReturns a Process object representing the active process.
setActiveProcessSets 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.

NameDescription
getIdReturns the unique identifier of the process.
getNameReturns the name of the process.
getStagesReturns a collection of stages in the process.
isRenderedReturns 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.

NameDescription
getProcessInstancesReturns all the process instances for the table record that the calling user has access to.
setActiveProcessInstanceSets 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.

NameDescription
getInstanceIdReturns the unique identifier of the process instance.
getInstanceNameReturns the name of the process instance.
getStatusReturns the current status of the process instance.
setStatusSets 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.

NameDescription
getActiveStageReturns a Stage object representing the active stage.
setActiveStageSets 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.

NameDescription
getCategoryReturns an object with a getValue method which will return the integer value of the business process flow category.
getEntityNameReturns the logical name of the table associated with the stage.
getIdReturns the unique identifier of the stage.
getNameReturns the name of the stage.
getNavigationBehaviorReturns 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.
getStatusReturns the status of the stage.
getStepsReturns 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.

NameDescription
getAttributeReturns the logical name of the column associated to the step.
getNameReturns the name of the step.
getProgressReturns the progress of the action step.
isRequiredReturns a boolean value indicating whether the step is required in the business process flow.
setProgressUpdates 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.

NameDescription
moveNextProgresses to the next stage.
movePreviousMoves 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.

NameDescription
getActivePathGets a collection of stages currently in the active path with methods to interact with the stages displayed in the business process flow control.
getEnabledProcessesAsynchronously retrieves the business process flows enabled for a table that the current user can switch to.
getSelectedStageGets the currently selected stage.

formContext.ui.process (Client API reference)

Understand Xrm object model

Controls (Client API reference)

No comments:

Post a Comment