Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
11 NOV, 2016:
The actual blog post has been updated to include all the necessary code for workflow development. Please read the actual post.
Let’s say we have students in the system. Some of the students are blocked due to overdue semester fees. System should be able to allow user to submit such students to a workflow process for approval to a super user e.g. Principal. Once the Principal approves such students only then students should be allowed to take more courses in the next semester.
1. Create a Workflow state Enum to have the following elements:
2. Add field of type Workflow state enum to the custom table FAZStudentTable. 3. Override canSubmitToWorkflow() method of the custom table to define Workflow submission criteria.
public boolean canSubmitToWorkflow(str _workflowType = '')
boolean ret = false;
if (this.Blocked == NoYes::Yes)
ret = true;
4. Create a Query for the custom table. 5. Create a Workflow Category. 6. Create a Workflow Type using wizard.
The following artifacts will be created:
7. Enable Workflow on the custom form FAZStudentTable by setting Design node properties as follows:
8. Give submit logic in SubmitManager class.
public static void main(Args _args)
submitManager = new FAZStudentTableSubmitManager();
public void submit(Args _args)
WorkflowComment note = "";
//Opens the submit to workflow dialog.
workflowSubmitDialog = WorkflowSubmitDialog::construct(
studentTable = _args.record();
// Get comments from the submit to workflow dialog.
note = workflowSubmitDialog.parmWorkflowComment();
studentTable.WorkflowStatus = MAKWorkflowStatus::Submitted;
// Send an Infolog message.
info("Submitted to workflow.");
error("Error on workflow activation.");
9. Create a Workflow Approval using the wizard.
10. Drag the newly created Approval to the Supported elements node of the custom Workflow Type. 11. Design the Workflow.
12. Test the workflow.
For your reference, see below the artifacts created in this development process:
Business Applications communities