E-Book, Englisch, 534 Seiten
Buxton Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook
2. Auflage 2024
ISBN: 978-1-83864-707-0
Verlag: De Gruyter
Format: EPUB
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)
Create and extend secure and scalable ERP solutions to improve business processes
E-Book, Englisch, 534 Seiten
ISBN: 978-1-83864-707-0
Verlag: De Gruyter
Format: EPUB
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)
A practical recipe-based guide to extend your Dynamics 365 Finance and Supply chain management implementation.
Key Features
Extend Dynamics 365 Finance and Supply Chain Management features in a cost-effective mannerLearn how to integrate with other applications and services securely using Business Events, OData and the Service BusExtend and hook into standard processes safely using Chain of Command
Book Description
Dynamics 365 Finance and Supply Chain Management is Microsoft's ERP solution, which can be implemented as a cloud or on-premise solution to facilitate better decision-making with the help of contemporary, scalable ERP system tools. This book is updated with the latest features of Dynamics 365 Finance and Supply Chain Management including Chain of Command (CoC), Acceptance Test Libraries (ATL), and Business Events. The book not only features more than 100 tutorials that allow you to create and extend business solutions, but also addresses specific problems and offers solutions with insights into how they work.
This cookbook starts by helping you set up a Azure DevOps project and taking you through the different data types and structures used to create tables. You will then gain an understanding of user interfaces, write extensible code, manage data entities, and even model Dynamics 365 ERP for security. As you advance, you'll learn how to work with various in-built Dynamics frameworks such as SysOperation, SysTest, and Business Events. Finally, you'll get to grips with automated build management and workflows for better application state management.
By the end of this book, you'll have become proficient in packaging and deploying end-to-end scalable solutions with Microsoft Dynamics 365 Finance and Supply Chain Management.
What you will learn
Understand the importance of using patterns and frameworks for creating unique solutionsWrite code that can make your solution extendableLeverage new frameworks that allow your solution to adapt as your business growsDesign the UI and business logic to fit standard patternsUnderstand how to not only write unit tests, but also perform efficient unit testing to automate the testing processDesign your security model and policies to provide code access privileges
Who this book is for
This Dynamics 365 book is for anyone who wants to learn Dynamics 365 Finance and Supply Chain Management development or migrate from C# or Microsoft Dynamics AX 2012 (or prior) development. Although finance and Supply Chain Management experience is not necessary, a background in software development is required. You will also need access to Microsoft's Lifecycle Services to download the necessary development tools.
Autoren/Hrsg.
Fachgebiete
Weitere Infos & Material
Table of Contents - 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
How to do it...
We will create a vehicle group table. We don't have much choice about the name in this as it has to start with our prefix, and end with Group; therefore, it will be ConVMSVehicleGroup. To create the table, follow these steps:
- Using the recipe for creating EDTs, create a vehicle group EDT using the following parameters:
| Property | Value |
| Name | ConVMSVehicleGroupId |
| Label | Vehicle group |
| Help Text | Used to group vehicles for sorting, filtering, and reporting |
| Extends | SysGroup |
- Save the EDT, but don't close the designer.
- From within the project, choose to create a new item.
- Choose Data Model from the left-hand list, and select Table from the right.
- Enter ConVMSVehicleGroup in the Name field and click Add.
- This opens the table designer in a new tab. From the project, drag the ConVMSVehicleGroupId EDT on top of the Fields node in the table, as shown in the following screenshot:
- This creates the field with the same name as the EDT. As this is our table, we should remove the prefix and name it VehicleGroupId.
- Click Save.
- We can now complete our EDT, open the ConVMSVehicleGroupId EDT (or select the tab if it is still open), and enter ConVMSVehicleGroup in the Reference Table property.
- Right-click on the Table References node, and select New | Table Reference.
- In the property sheet, select the Related Field property, and then select VehicleGroupId from the drop-down list.
- Check that the result is shown as follows:
- Save the EDT, and close its designer. This should make the active tab the ConVMSVehicleGroup table designer; if not, reselect it.
- From Application Explorer, which is opened from the View menu, expand Data Types, and then expand Extended Data Types.
- Locate the Name field, and drag it onto the Fields node of our table. You can also just type the Name field directly into the property value.
- We will now need to add an index; even though this table will only have a few records, we need to ensure that the ID field is unique. Right-click on the Indexes node, and choose New Index.
- With the new index highlighted, press the function key and rename it to GroupIdx. Change the Alternate Key property to Yes. All unique indexes that will be the primary key must have this set to Yes.
- Drag the VehicleGroupId field on top of this index, adding it to the index.
- Open the VehicleGroupId field properties, and set the Mandatory property to Yes, AllowEdit to No, and leave AllowEditOnCreate as Yes.
- We can now complete the table properties select the table node in the table design (the table name), and complete the property sheet as follows:
| Property | Value | Comment |
| Label | Vehicle groups | This is the plural name that appears to the user. VehicleGroupTable is a good label ID for this, as it gives context to others that might want to reuse this label. |
| Title Field 1 | VehicleGroupId | These two fields appear in automatic titles generated when this table is used as a title data source. |
| Title Field 2 | Name |
| Cache Lookup | Found | This is linked to the table type, and warnings will be generated should an inappropriate cache level be selected. None: no caching is fetched from the DB every time. NotInTTS: Fetched once per transaction. Found: Cached once found, not looked up again. EntireTable: The entire table is loaded into memory. The cache is only invalidated when records are updated or flushed. |
| Clustered Index | GroupIdx | This index is created as a clustered index. Clustered indexes are useful as they include the entire record in the index, avoiding a bookmark lookup. This makes them efficient, but the key should always increment, such as a sales order ID; otherwise, it will need to reorganize the index when records are inserted. This table is small, so it won't cause a performance issue. It will also sort the table in Vehicle Group order. |
| Primary Index | GroupIdx | This defines the primary index and is used when creating foreign key joins for this table. |
| Table Group | Group | This should always be Group for a group table. Please refer to the table of table groups in the Introduction section. |
| Created By Created Date Time Modified By Modified Date Time | Yes | This creates and maintains the Created by tracking fields and is useful if we want to know who created and changed the record, and when. |
| Developer Documentation | The ConVMSVehicleGroup table contains definitions of vehicle groups. | This is required for best practice and should contain information that other developers should understand about the table. |
| FormRef | ConVMSVehicleGroup | This is a reference to the display menu item that references the form that is used to view the data in this table. When you choose View details in the user interface, it is this property that is used to determine which form should be opened. It is fine to fill this in now for speed, but the build will fail unless we have created the form and menu items. |
- All visible fields should be placed in a field group. Since this is a group table with two fields, we only need an Overview field group. Right-click on the Field groups node, and choose New Group.
- Press to rename the group to Overview and enter Overview in the label property before clicking the ellipsis button in the value. This opens the Label Lookup form.
- Select Match exactly, and click search (the magnifying glass icon). Scroll down to find the first @SYS label with no description or one that exactly matches our intent, as shown in the following screenshot:
- Select the @SYS9039 label and click Paste label.
- Drag the two fields onto the group, and order them so that VehicleId is first in the list.
- In order for any automatic lookups to this table to show both the ID and Description fields, add both fields to the AutoLookup field group.
- We can skip to the Methods node, where best practice dictates we need to provide the Find and Exist methods.
- Right-click on the Methods node, and choose New Method.
- This will open the code editor, which now contains all methods, and will create a simple method stub, as shown in the following block:
private void Method1()
{
}
- Remove the XML documentation comment section and the method declaration, and then create the Find...




