locked
Inserting LOOK UP values for custom entities + crm 4.0 RRS feed

  • Question

  • Hi all,

    I have created a custom entity(say ABC) and created N:1 relations ships between ABC -> opportunity and ABC-> Account. we have an asp.net application running in another server (in the same LAN as crm server). In that we have an aspx page, on submitting the page, we have create a new record in the custom entity (ABC). We need to insert the look up values as well (fields that we got after creating relationships). I couldn't find any proper solution to set values values for those look up fields...can anyone provide me solution (sample code) for inserting a record in custom entity which has lookup fields. Also can we do it using webservices or do we need use sdk libraries.....kindly respond ASAP...VERY URGENT.

     

    Wednesday, October 6, 2010 12:36 PM

Answers

  • Hi all, Well my requirement is how to insert the date into lookup fields .... well I've done some R&D and was able to do it on my own using "LookUp" class.....Anyway thanks for your help...
    Thursday, October 7, 2010 9:25 AM

All replies

  • Hello, Bittu.

     

    Can you show the code you use now?


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Wednesday, October 6, 2010 12:38 PM
    Moderator
  • You can provide this information to your instance of ABC in one of two ways:

    1. At the moment you create it
    2. As a separate update

    Which one you choose will depend on when and how you know the most important thing:  the values of these fields.  For Lookup fields you generally need to know two things, when assigning a value in .Net:  the value of the Primary Key (Guid) for the record and the schema name of the record's type (e.g.: "account", "contact", "opportunity").

    What Andriy is trying to get at is the code so he can see how you're creating an instance of ABC, and when and where you have information about the Account and/or the Opportunity.  Are you using a DynamicEntity?  Are you using the Advanced Developer Extensions?  Etc. etc.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Wednesday, October 6, 2010 6:56 PM
    Moderator
  • Hi all, Well my requirement is how to insert the date into lookup fields .... well I've done some R&D and was able to do it on my own using "LookUp" class.....Anyway thanks for your help...
    Thursday, October 7, 2010 9:25 AM