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
Tag: Retrieve
Retrieve primary entities along with related entities with one QueryExpression
A colleague asked me how to query multiple primary records and their related records using one QueryExpression. I paused for a moment, I couldn't answer him certainly. I thought it would be possible, so I started researching. Here is what I found.