Loading...

RETRIEVE RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

RETRIEVE RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

If you are working with Dynamics 365 SDK and do not have the GUID of the record, there is an alternative method to retrieve it using its alternate keys. However, the Retrieve method does not provide an option to pass the alternate key value. Therefore, to retrieve records using alternate keys in Dynamics 365 SDK, you need to use the RetrieveRequest. In this tutorial, a sample code is provided for retrieving a record based on the alternate key using the SDK.

To achieve this, you need to set up the alternate key for the relevant entity and then retrieve the record using the alternate key value. The code sample uses the Account Name (name) field of the account entity as the alternate key.

The sample code provided in the tutorial shows how to retrieve the required record using the alternate key. It uses the KeyAttributeCollection and RetrieveRequest classes to make the request.

It is essential to note that if there is no record with the specified key value, or no key is added to the specified entity, an exception message is returned stating, "The specified key attributes are not a defined key for the account entity."

If you're looking to retrieve records using alternate keys in Dynamics 365 SDK, this tutorial on Master Data Skills + AI is an excellent resource to help you with the process.

Published on:

Learn more
Dynamics 365 Education and Knowledge
Dynamics 365 Education and Knowledge

Share post:

Related posts

What is Legal Entity in Dynamics 365 F&O ? How to create a Legal Entity in Dynamics 365 F&O

A "legal entity" is an organization that has registered with a legal authority, legal entity can enter legal contracts and are required to pre...

10 months ago

How the “Regarding” field works in Microsoft Dynamics 365 CRM and the process for adding a custom entity to the “Regarding” lookup field.

Microsoft Dynamics 365 CRM is a powerful tool that allows you to associate records with other entities through the use of the "Regarding" fiel...

6 months ago

The Perfect Solution to Clone Records, Child Records with Target Records in Dynamics 365 CRM!

Creating identical or similar records is a common occurrence in various businesses. For example, businesses dealing with repeat customers, rec...

1 year ago

Tooltip on Search for Entity records in Dynamics 365

If you're using Microsoft Dynamics 365, you know that it offers various settings that can be configured as per different business requirements...

1 year ago

Tooltip on Search for Entity records in Dynamic 365

If you're using Microsoft Dynamics 365, you can configure various settings to improve your UI experience and cater to your unique business req...

1 year ago

Undo and retrieve deleted history records in Microsoft Dynamics 365 CRM – 1 click is all you need!

If you use Microsoft Dynamics 365 CRM, it's important to know that deleted records cannot be recovered once they're gone. But what happens if ...

1 year ago

CREATE DYNAMICS 365 ENTITY IN SDK

If you're looking to create a custom entity in Microsoft Dynamics 365 using SDK, this tutorial provides a step-by-step guide on how to do so. ...

2 years ago

CREATE OR UPDATE (UPSERT) RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

If you're working with Dynamics 365 SDK and need to create or update records using alternate keys, this post is for you. The post walks you th...

2 years ago

Enable custom entity for outlook dynamics 365

This video provides a step-by-step guide on how to enable a custom entity for Outlook in Dynamics 365. By doing so, you can easily view and ma...

2 years ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy