none
CRM 2011 - Adding two different entity type records to the same subgrid

    問題

  • I have two entities which I'll call entity A and entity B.  On another entity (entity C) form, I have a subgrid.  The subgrid is able to be configured so that entity A's records can be added to it, but how do I add records for entity B? There is no option out-of-the-box to add two different types of entity records to the same subgrid.  Any ideas?  Thanks
    2012年9月26日 下午 08:52

解答

  • You cannot include records of two different entities in one sub-grid. A grid can only hold record of single base entity. However you can add columns of related entities to the view. To give an example, in the Account view, you can include emailaddress, phone or any other column of the primary contact entity. The related entities works for any entity for which you have a lookup added to the base entity.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    2012年9月27日 上午 03:31

所有回覆

  • You cannot include records of two different entities in one sub-grid. A grid can only hold record of single base entity. However you can add columns of related entities to the view. To give an example, in the Account view, you can include emailaddress, phone or any other column of the primary contact entity. The related entities works for any entity for which you have a lookup added to the base entity.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    2012年9月27日 上午 03:31
  • I know this is kind of an old post, but I'm having the same problem here. 

    We have a vehicle (entity C in your case) with line items (entity A) (ie. a custom bumper worth $600 on Reference No. 34563) and service codes (entity B) called T-Codes (ie. T21 is an oil change worth $36). Currently we have two subgrids on the vehicle to show these. On the Vehicle Quote, salesmen can add their own line items (entity D!) and their own service codes (entity B), meaning we have a total of four subgrids on a vehicle quote (two from the truck two from the quote). Not only does it take up space and split up what are essentially just line items and could be shown together, it makes it harder to do reporting and everything like that. 

    My solution is something like this, I haven't implemented it yet but it's what I'll be working on:

    Make another entity called Vehicle Items with the fields Description, Price, T-Code ID (lookup), Reference No., Analysis ID (lookup), Vehicle ID (lookup)

    Make a plugin/workflow that when a new Service Code record or Line Item record is created on either the vehicle or an analysis, it adds a record to Vehicle Items:

    If it's a T-Code on the vehicle, fill description, price, T-Code ID, Reference No., Vehicle ID

    If it's a Line Item on the vehicle, fill description, price, Reference No., Vehicle ID

    If it's a T-Code on a quote, fill description, price, T-Code ID, Reference No., Vehicle ID, Analysis ID

    If it's a Line Item on a quote, fill description, price, Reference No., Vehicle ID, Analysis ID

    This way, I can have just one subgrid on the Vehicle, and one on the Quote. All I have to do is filter the subgrid by Vehicle ID equals Current Vehicle and Analysis ID Does Not Contain Data to get a singular subgrid on the Vehicle. On the Quote, I do the same except Analysis ID equals current Analysis.

    We can use this Vehicle Items entity on our SSRS reporting and everything, makes life so much easier. Now... I wonder how long this'll take one guy to do. My guess is on "about a couple days".


    • 已編輯 JustinCredible- 2013年7月25日 下午 02:52 edit: we have just one T-Code entity that has N:N relationships with the vehicles and quotes
    2013年7月25日 下午 02:42