In every CRM implementation, we deal with some sort of master data in CRM. Normally we use traditional way to store master records by creating custom entities. But we do have better way to store master data using Category entity. This entity was introduced in CRM 2016. This entity is very helpful to implement hierarchical structure. In this article we are going to use category entity to store state and city master data for demo purpose.
Let say we are developing an event management solution and we have requirement to show state and city information in our event entity (We can use similar way in any other entity). We will be using category to store these details. To use category entity we can navigate to Settings -> Service Management ->Categories.
You can refer more details about category here.
Let’s first setup Parent Category and name it as State, we will be using it for setting default view for state and city lookup later.
Once parent category is setup we can create child records manually or import child records by downloading data import template for category under Data Management->Templates for Data Import.
Now we need to create two view to show only State and City category in respective lookups (we may have some other master data stored in category entity). Navigate to default solution and create new view for Category entity using following filter criteria:
Now we need to create lookup for State and City in our event entity, navigate to event entity and create two lookup fields for state and city by selecting Target Record Type as Category.
once state is selected, it will show corresponding cities under city lookup. Similarly we can use category entity to implement more scenarios.