Retrieve Record using Alternate Keys

Instead of retrieve a single record using Entity IOrganizationService.Retrieve(string entityName, Guid id, ColumnSet columnSet); You can easily retrieve the record using its alternate keys if you don't have the id in advance: var keys = new KeyAttributeCollection { { "new_parent", parentRef.Id }, { "new_code", "code01" } }; var request = new RetrieveRequest { ColumnSet = … Continue reading Retrieve Record using Alternate Keys

Field Restriction in Alternate Keys

Alternate keys is a useful functionality introduced from CRM 2016. It allows you specify one or more fields to be an alternate key and use it to identify a record instead of using GUID. This is extremely helpful when you work with data migration and/or data integration between systems. More about Altenate Keys here. Only … Continue reading Field Restriction in Alternate Keys