Add own entity to case management in D365
Case managment is a
generic cross module solution where you can log cases with or without a defined
process and keep a information. A case can be related to a number of various
entities in the solution.
There are 9 case categories where you can group processes:
·
General
·
Sales
·
Purchase
·
Service
·
Project
·
Production
·
Collections
·
Audit
·
Human Resources
You also have 22 entities you can associate the case with:
·
Lead
·
Opportunity
·
Customer
·
Vendor
·
Prospect
·
Project
·
Sales order
·
Purchase order
·
Worker
·
Service order
·
Item
·
Customer transaction
·
Expence report
·
Expence report line
·
Venrod invoice
·
Vendor invoice line
·
Purchase order line
·
Returned order
·
Case
·
Product
·
BOM/Formula
·
Route
Both categories and entities can be extended.
Working with manufacturing companies we quickly came in to a
lack of entities that our customers often wanted to associate a case with.
Mainly Production orders and tracking data like serial and batch numbers. We
also added a lot of other entities to our standard expansion solution to our
customers.
How to extend the entities?
Step 1:
Extend Enum CaseEntityType
Lets name Enum Extension as CaseEntityType.Ext
Step 2:
Add element to CaseEntityType.Ext
Step 3:
Make a class that implements CaseAssociation
Step 4: Create relations from the case association table
(CaseAssociation) to the new entity tables
Set the parameter “UseDefaultRoleNames” to “Yes”.
Set the parameter “UseDefaultRoleNames” to “Yes”.
Step 5: Create
Extension of CaseDetail form, add entity table as datasource and set following
parameters
Step 6: Add
fieldGroup CaseMoreInformation in the entity table
Step 7: Create a
Form as shown below
Step 8: Create DisplayMenuItem for above form
Step 9: Add formContainerControl in the CaseDetail extension
and set following properties
Step 10: Make an eventHandlerClass, go to CaseDetail form
copy postEventHandler of showMoreInformation method and paste that in
eventHandler Class.
Step 11: add below code to postEventHandler of
showMoreInformation Method
Step 12: Add Case Create MenuItem
Step 13: Add CaseDetail MenuItem
Comments
Post a Comment