0
votes

I'm new in CRM 2011. So not familiar with all it functionality.

Have a question about displaying data from multiple related entities.

First Entity is a Users (contain information about user) Second Entity is a Class (contain information about class user enrolled) Third Entity is a Class Attendance (contain information if user attended class on specific date)

The idea is to show view with users who is enrolled in class. To show start end dates and if user attended class or not. Administrator should select user and change status to attended or not.

How it can be done in CRM 2011? Is it required custom development or just to View Customization using user interface in CRM?

Any suggestion or examples highly appreciated.

2

2 Answers

4
votes

In Mscrm you can create a view for a single primary record type, on this view you can show fields from the primary record. You can also include secondary records that are linked via a lookup to the primary record, you can show columns of these secondary linked records. The limitation here is that you cannot link tertiary records from these secondary linked entities. The slight confusion here is that you can show the name of the tertiary entity as its a field on the secondary entity.

So to put this into the context for a real example, take the following entity model.

  • Contact has a 1 to Many relationship with incident (a contact can have many incidents, each incident has a lookup to contact)
  • Incident has a 1 to Many relationship with task (an incident can have many tasks, each task has a lookup to an incident)

So a view of tasks can;

  • Show all the fields from the task (task in the primary)
  • Show all the fields from the incident (incident is the secondary)
  • Show the name of a the contact, but not any other field (contact is a tertiary, but its name is shown as a field from the incident)

This is one of those things that becomes a lot clearer when you actually try it out for yourself. Its hard to say what you will be able to achieve because its not clear what your entity model is.

In any case here is how you create your own custom view.

CRM > Settings > Solutions > Your Solution > Your Entity > Views > New. There are various buttons would should hopefully be self explanatory.

Click Add Columns and it will present you with fields of the primary entity, use the Record Type drop down option to select fields from linked secondary entities.

1
votes

Reading between the lines you have: Class entity with many:many relationship to student (user), so a user can be enrolled on more than one class and a class has more than one user.

There is then a second entity for attendance which by the sound of it has a many:1 relationship to both student and class, and has a status to show attendance for a particular instance of the class on one date.

So far sounds like a good model.

Using the ideas in James' answer you ought to be doing a view of Attendances, including the name of the class and user. You might also have extra columns from the user or class to show things like when the course starts and ends, what the student's email address is etc.

Sort this view by class, then student, then attendance date and you have a pretty good view. But this won't display in any kind of hierarchy or show summaries. You might want to look at building a custom report for this instead so you can report on attendances, grouped by student and grouped by class. If you get clever you could also add filters for dates so you can look at attendances last month only, for example. You can probably do a lot of this with the built-in report wizard, for more complex or pretty versions go to SSRS