Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Dynamics CRM pass two lookup values to save in the crm database.

Posted on by

Hello All Expert,

I need to pass two lookup values while creation of the record into the CRM using the SDK.Rest.

could anyone make me understand how do i pass two lookup values at a time.

Categories:
  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Dynamics CRM pass two lookup values to save in the crm database.

    Hi,

    In addition to above suggestions, assuming you want to pass two lookup field while creating records using REST,

    You can set lookup like following in OData request

    entityobject.lookupfield= {

                       Id: id,

                       LogicalName: "typename",

                       Name: "name"

                   };

    But as you are using Dynamics 365, you should use Web API instead of REST, you can pass lookup like following in Web API

    entityobject["lookupfieldname@odata.bind"]="/targetentity(guid)";  //setting existing lookup

    You can refer: http://himbap.com/blog/?p=2035

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Dynamics CRM pass two lookup values to save in the crm database.

    Hi,

    You can refer here how to pass lookup value SDK.Rest create method .

    arunpotti.wordpress.com/.../rest-create-example

    In addition if you are using Dynamics CRM 8.1 or above you can use CRM API instead of SDK.Rest. You can generate your code using CRMRestBuilder .

    Download CRMRestBuilder from here-

    github.com/.../releases

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans