Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition

You're reading from  Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition

Product type Book
Published in Mar 2020
Publisher Packt
ISBN-13 9781838643812
Pages 534 pages
Edition 2nd Edition
Languages
Author (1):
Simon Buxton Simon Buxton
Profile icon Simon Buxton

Table of Contents (17) Chapters

Preface Starting a New Project Data Structures Creating the User Interface Working with Form Logic and Frameworks Application Extensibility Writing for Extensibility Advanced Data Handling Business Events Security Data Management, OData, and Office Consuming and Exposing Services Unit Testing Automated Build Management Workflow Development State Machines Other Books You May Enjoy

Creating a state machine handler class

The state machine provides control over the transition rules, but, sometimes, we want to ensure that other validation rules are obeyed in order to validate whether the transition can be done.

This is done by subscribing to the Transition delegate of the ConVMSVehicleTableInspStateMachine class that was generated by the state machine.

The code in this recipe will be tied programmatically to the state machine. Should you wish to attach the statement to the workflow directly (which is a great idea), the status will be set by the state machine. Therefore, the event handlers must not set the status. Furthermore, should the validation written in this recipe fail, we must ensure that the workflow's internal status matches the state machine's status. This can be done by canceling the workflow by throwing an error.

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}