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.
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.
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
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-
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156