In CRM 2013, there is a new feature in the business process, which directs the user to operate the form under well-established business rules and to achieve a prior business connection. And let the cohesion be able to visualize, can clearly locate the current process at that node. We can filter the data by placing the process stage in the View column when we configure the view.
However, this orchestration has a name that is not allowed to be customized in the workflow, such as making the workflow of the CRM unable to change the record process stage. At this point, you may want to program for automation, programming can choose plug-ins or directly modify the database. To better understand the process, let's look at the structure in the database
Businessprocessflowinstancebase, which represents an instance of a process, is described in the SDK as an entity that can span up to 5 entities as well as a maximum of five entity IDs defined in the table structure. Each entity record can only be implemented by EntityId for a single process instance.
The definition of each process is defined by the following table, Processstagebase defines the basic structure of the process, the stage category, and the stage name. Query through the following stages
SELECT Process_processstage. Owningbusinessunit, Process_processstage. ownerID, Process_processstage. Name as Processidname, Process_processstage. Owneridtype, dbo. Processstagebase.primaryentitytypecode, dbo. Processstagebase.processid, dbo. Processstagebase.processstageid, dbo. Processstagebase.stagecategory, dbo. Processstagebase.stagename, dbo. Processstagebase.versionnumberfrom dbo. Processstagebase left OUTER JOIN dbo. Workflowbase as Process_processstage on dbo. Processstagebase.processid = Process_processstage. WorkflowId and Process_processstage. Overwritetime = 0 and process_processstage.componentstate = 0
field is automatically created on the entity record as long as the business process is enabled the established Processid,stageid is for the Processstageid and ProcessID in the businessprocessflowinstancebase.
Knowing the data structure above, we can flexibly change the stage name of the entity, as long as the corresponding Stageid value can be modified.
Businessprocessflowinstancebase
The business process in CRM 2013