Objective — Automatically reopen a record’s Business Process Flow (BPF) and set it to a specific stage as soon as a flag on the parent record changes, using only a background workflow (no code, no ribbon commands).
1 · Sample scenario
Element | Sample value | Your replacement |
---|---|---|
Main table | new_project (Project) | Your entity |
BPF name (display) | Project Lifecycle Flow | Your BPF name |
BPF table (schema) | new_projectlifecyclebpf | Your BPF table |
Trigger field | Existing Contract? (new_contractflag ) | Boolean / option set |
Target stage | Review Completed | Desired stage |
2 · Build the background workflow
- Find the BPF table: Advanced Find → Look for Business Process Flows. Locate Project Lifecycle Flow; note its schema name (
new_projectlifecyclebpf
). - Create workflow:
- Process name:
Move BPF to Review Completed
- Category: Workflow
- Entity:
new_projectlifecyclebpf
- ✓ Run this workflow in the background
- Scope: Organization
- Process name:
- Start when → Process changes.
ExpandProject Lifecycle Flow ▸ Project (new_project)
and tick Existing Contract? only. - Add a Check Condition:
If Project (new_project) Existing Contract? Equals Yes
- Inside the If → Update Current BPF row.
Set Active Stage = Review Completed. - Activate the workflow.
3 · What happens at runtime
- User sets Existing Contract? to Yes on a Project record and clicks Save.
- The background workflow runs against the linked Project Lifecycle Flow row.
- The BPF is auto-activated (if needed) and its Active Stage becomes Review Completed.
- After a few seconds, refreshing the form shows the header on the new stage.
4 · Tips & cautions
- Primary Entity must be the BPF table. Only the BPF row exposes the Active Stage field.
- Background workflows only — real-time workflows cannot change Active Stage.
- The update also auto-sets statecode to Active if the BPF row was inactive.
- Users must refresh (or wait for Dynamics’ header poll ≈ 10 s) to see the change.
Need instant feedback? Add
setTimeout(() => formContext.data.refresh(false), 3000);
to the form’s OnSave.
5 · Result
With one no-code background workflow your process stays perfectly aligned with key data: as soon as the flag flips, the Business Process Flow jumps to the required stage—no plug-ins, no JavaScript, just configuration.
No comments:
Post a Comment