locked
significance of creating a lookup field in relationship RRS feed

  • Question

  • What is the significance of creating a look up field in relationship? I know its some kind of primary key and foreign key relationship but i a not able to understand this in msrm.. From database prespective a primary key in one table becomes the foreign key in an other table and using this foreign key the related records are pulled from second table..

    How it helps in pulling the data from the target entity?

    Can anyone please elaborate on this with example? If I create more than one relationship on the same two enities then how the lookup field affect?

    Thanks,

    Rajan

    Monday, July 16, 2012 4:43 PM

Answers

  • It works exactly the same way as you mentioned as primary key and foreign key. But some times you can have multiple relationships between the tables.

    For example an account can have a primary contact and account can also have a secondary contact. These contacts can be the same contacts or different contacts.

    for the above example I will create 2 1:N relationships between contact and account and put the lookup field on account entity.

    yes every every 1:N relationship will have mapping except system relationships. Generally the mapping works when you create a child record from the parent form. it is  a client side thing. but system relationships fields get populated automatically--does not matter how you create a record. for e.g owner field. This field will always be filled if the record is created from the parent form or code. Thats why system relationships does not have mappings.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    • Proposed as answer by Amreek Singh Tuesday, July 17, 2012 2:03 PM
    • Marked as answer by HIMBAPModerator Saturday, July 28, 2012 5:40 PM
    Tuesday, July 17, 2012 2:03 PM

All replies

  • Hi Rajan .Panchal : 

                               We don have relation ship in lookp field in MS CRM 2011. 

    A look up is used to refer selected ENTITY Record from Other ENTITY . 

    STEP 1 : We can create Normal Look Up Referring Selected Entity Record.

    STEP 2: We can Create Filter Look Up ( According to several Condition Data Can be fetched and filtered ) 

    STEP 3: Using Look Up we can call Json , Odata ( for CREATING , UPDATING , DELETING , RETRIEVE ) a particular Field. 

    Bellow Example will give you a brief Knowledge about LOOK UP & FILTER LOOK UP...

    http://gtcrm.wordpress.com/2011/03/22/filtered-lookup-approaches-in-crm-2011/

    http://crmconsultancy.wordpress.com/2011/05/17/filtered-lookups-in-crm-2011/

    Monday, July 16, 2012 5:42 PM
  • How this look up field works internally that will make me undertand better..
    there is also requirement level to this look up field? Why this is given?

    For some relationship the mappings information i not present.. however, when a new relationship is created a default mappings gets created between the ids of the two entities.

    Tuesday, July 17, 2012 1:36 PM
  • It works exactly the same way as you mentioned as primary key and foreign key. But some times you can have multiple relationships between the tables.

    For example an account can have a primary contact and account can also have a secondary contact. These contacts can be the same contacts or different contacts.

    for the above example I will create 2 1:N relationships between contact and account and put the lookup field on account entity.

    yes every every 1:N relationship will have mapping except system relationships. Generally the mapping works when you create a child record from the parent form. it is  a client side thing. but system relationships fields get populated automatically--does not matter how you create a record. for e.g owner field. This field will always be filled if the record is created from the parent form or code. Thats why system relationships does not have mappings.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    • Proposed as answer by Amreek Singh Tuesday, July 17, 2012 2:03 PM
    • Marked as answer by HIMBAPModerator Saturday, July 28, 2012 5:40 PM
    Tuesday, July 17, 2012 2:03 PM