locked
Relationships - basics of custom entities and relationships RRS feed

  • Question

  • Hi, 

    I am struggling with the basics of custom entities and relationships.

    I need to create a child of Service Activity called "Service Activity Task".  This will be a new custom Entity.

    Now these are my questions.

    1. Do I need to add a regarding field in "Service Activity Task" (the new custom entity)  that points to "Service Activity"?

    2. Do I need to add a relationship and if so what type (1:N, N:1) etc.

    3. How can I simply show a view in a tab on "Service Activity" that shows related "Service Activity Tasks" (the new custom entity).

    I have made previous posts, but I am really struggling with the basics first.

    Thanks Daren

    Wednesday, April 28, 2010 3:01 AM

Answers

  • Daren,

    I meant create a new custom entity and specify that it can own Activities at the time of creation.  That entity could represent your overall Service effort and you can use the out-of-the-box Service Activities as the granular tasks that need to be performed in order to complete that Service effort. Note that the same could be accomplished with the out-of-the-box Case entity if you're not using it already for a different purpose.

    You could theoretically use the approach that you describe in your second point but I would use that approach as a last resort. If you want to go in that direction, I recommend starting with Adi Katz's FetchXml viewer which allows you to display the results of a FetchXml in an IFrame: http://mscrm4ever.blogspot.com/2009/03/display-fetch-in-iframe-part-2.html

    Ivan Kurtev

    Thursday, April 29, 2010 1:02 AM

All replies

  • Daren,

    Service Activities like all other Activities in Microsoft CRM 4.0 are considered the lowest level of customer interactions. As such, you can only add 1:M Relationships to Activities, i.e. other entities can own Activities but Activities cannot own other Entities.

    I would recommend that you create a custom entity that owns individual service activities and/or tasks (make sure you check the Activities checkbox on the New Entity form) and try to meet your requirements that way. This may not be ideal if you want to use the Scheduling functionality available with Service Activities only, so you need to keep that in mind.

    Good luck,

    Ivan

    Wednesday, April 28, 2010 5:15 AM
  • Thanks Ivan,

     

    When you say "create a custom entity that owns individual service activities" what do you actually mean?  Should I have a custom entity with a field holding a bunch of Service Tasks?

    Secondly I understand  that Service Activities are the lowest, however do you think I can still see a View of the new custom entity by using say a modified Advanced Search view? Maybe I need to simply add a nVarChar field holding the GUID of the Service Activity (parent) for filtering purposes?

    Thanks in advance.

    Wednesday, April 28, 2010 8:13 AM
  • Daren,

    I meant create a new custom entity and specify that it can own Activities at the time of creation.  That entity could represent your overall Service effort and you can use the out-of-the-box Service Activities as the granular tasks that need to be performed in order to complete that Service effort. Note that the same could be accomplished with the out-of-the-box Case entity if you're not using it already for a different purpose.

    You could theoretically use the approach that you describe in your second point but I would use that approach as a last resort. If you want to go in that direction, I recommend starting with Adi Katz's FetchXml viewer which allows you to display the results of a FetchXml in an IFrame: http://mscrm4ever.blogspot.com/2009/03/display-fetch-in-iframe-part-2.html

    Ivan Kurtev

    Thursday, April 29, 2010 1:02 AM