web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Lookup Field creation using code with Guid( Metdadataid)

(0) ShareShare
ReportReport
Posted on by 47

Hi All,

Reuest your help to create  lookup using code with using metadataid.

I have the same question (0)
  • Suggested answer
    Anh Luu Profile Picture
    215 on at

    You cannot directly create a lookup field using code, you should create OneToMany relationship instead.

    Check the sample code here: https://docs.microsoft.com/en-us/previous-versions/dynamics-crm2011/developers-guide/gg327589%28v%3dcrm.5%29

    Hope it helps!

    Kim Anh

  • jainshweta Profile Picture
    47 on at

    Hi Anh,

    Thank you for your  reply.

    I have created lookup field using GUI in development instance but i can not take this field in solution migration in other crm instance( Quality or staging server). so i would like to create with same guid of lookup field or relationshipid of development instance in other crm instance.

  • Miguel Lourenco Profile Picture
    Microsoft Employee on at

    Hi,

    You should be able to transfer that lookup. there should be no need of creating it manually in quality and staging.

    Is there any error?

  • jainshweta Profile Picture
    47 on at

    Hi

    There is some issue and not sync with all instance.

    so I can not migrate any field from once instance to another. so I  would like to create manually with same guid reference.

    Is there any idea about it.how can we create lookup field with same guid reference.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 101 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans