locked
crm relationships and related buttons/views? RRS feed

  • Question

  • Hello - I'm working on a CRM system with relationships defined between entities. There is a 1:N relationship defined between company and opportunity. There is also a 1:N relationship defined between company and quote.  I'm guessing that the company form auto-generates the buttons to support this functionality based on the relationships that have been defined between the entities.  Are my assumptions for this correct?

    Does CRM also auto-generate views for these relationships?  If I open the company and click on the Opportunities button on the left hand pane then CRM displays "Opportunity Associated View" in the right-hand pane. Is that an auto-generated CRM generated view?

    Also, is there a way to determine the table/view I can query to find out if any data has been saved for this association?

    Tuesday, April 9, 2013 10:02 PM

Answers

  • Hi,

          CRM 2011 comes with default view called 'Associated view' which is displayed when user tries to view the relevant data from related entity. To give you an example, from Account when you select Opportunity, Associated view is selected by default. This displays all the related Opportunities for this Account.

         I am not sure what you mean by query. There are various ways you can query fro this. If you are using advanced find, select the opportunity record and look for any opportunity with the matching Account data. You can perform the same query in client side using JavaScript and server side using coding. Here is the link to SDK fro various examples for the same.

    http://www.microsoft.com/en-au/download/details.aspx?id=24004

    Hope this helps.
    -----------------------------------------------------------------------

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

    Tuesday, April 9, 2013 11:44 PM
  • About you first question, for every 1:N relationship the buttons and navigation shortcuts would be created automatically. However, you could customize these items on the form.

    About the second question, the associated views are also auto generated for the newly generated 1:N relations, and this views are available on the parent entity.

    About the third question, you could not manipulate the views easily. But you could query tables for any data with a SSRS report.


    If the answer helped you, remember to mark it as answer.
    My Weblog -- My Website -- My Facebook

    Wednesday, April 10, 2013 4:18 AM
    Moderator

All replies

  • Hi,

          CRM 2011 comes with default view called 'Associated view' which is displayed when user tries to view the relevant data from related entity. To give you an example, from Account when you select Opportunity, Associated view is selected by default. This displays all the related Opportunities for this Account.

         I am not sure what you mean by query. There are various ways you can query fro this. If you are using advanced find, select the opportunity record and look for any opportunity with the matching Account data. You can perform the same query in client side using JavaScript and server side using coding. Here is the link to SDK fro various examples for the same.

    http://www.microsoft.com/en-au/download/details.aspx?id=24004

    Hope this helps.
    -----------------------------------------------------------------------

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

    Tuesday, April 9, 2013 11:44 PM
  • Hi there,

    Yes you are correct - when a relationship is defined between two entities, the system will automatically create all the required components to enable the association of records as well as the presentation of those associations against the concerned record types.

    To elaborate, when a new relationship is created between two entities of type 1:N, the system will create an attribute of type 'lookup' on the child entity; this will enable the association of a parent record each time a new record of this type is created. A user with appropriate permissions is able to then add this lookup attribute to the form in order to enable users to physically create an association. A decision can also be made to determine whether the lookup attribute is a required for saving any record of this type.

    In addition to the lookup on the child entity, within the left form navigation area of the parent entity, the system will also present an navigation element to show the related child records.

    For example, the 1:N relationship between 'Company' and 'Opportunity' will do the following:

    - When creating a new Opportunity, the user will have a 'Company' lookup available on the form (assuming it has been added by an administrator)

    - When viewing a Company record, a user will be able to view all associated 'Opportunities' as an option within the left navigation pane (ie. all Opportunities which have this Company selected in the ‘Company’ lookup – this is the primary element of the underlying query for this view)

    Please also note that whether or not a specific user is able to see and interact these relationships is also dependent on their assigned security roles/permissions to the concerned entities.

    With regards to the what view is presented when you click on the associated 'Opportunities' from a 'Company' record - this is not something which is generated as part of the relationship definition.

    When a new entity is created within the system, a number of standard views will be created - one of which is the associated view (customizable by an administrator). The associated view will essentially be displayed whenever a list of associated records (of that entity type) needs to be displayed - this is regardless of relationship. For example, if you have a 1:N relationship between Company and Opportunity, and a 1:N relationship between Contact and Opportunity; whenever you view the related opportunities from either a Company OR a Contact, you will be presented with the same view including columns, filters and sort order (etc.).

    That is pretty much how 1:N relationships work in a nutshell ... do note however, that there are some slight exceptions to this for some system entities and/or system relationships.

    Hope this was useful and makes sense!

    Thanks,

    Maryse


    The xRM Architect:

    Tuesday, April 9, 2013 11:50 PM
  • About you first question, for every 1:N relationship the buttons and navigation shortcuts would be created automatically. However, you could customize these items on the form.

    About the second question, the associated views are also auto generated for the newly generated 1:N relations, and this views are available on the parent entity.

    About the third question, you could not manipulate the views easily. But you could query tables for any data with a SSRS report.


    If the answer helped you, remember to mark it as answer.
    My Weblog -- My Website -- My Facebook

    Wednesday, April 10, 2013 4:18 AM
    Moderator