Hi
I am currently create oData queries dynamically to get data out of dataverse. The problem I have is the name for each field/attribute that you specify in the $select query seems to change betweek LogicalName and SchemaName. Is there a way to determine when to use logical and when to use schema? For example, the following query has to use logical for createdby but schema for CreatedByExternalParty
xxx.crm11.dynamics.com/.../accounts(27cacceb-2a0b-ec11-b6e5-0022484220b6) name &$expand= createdby ( $select= fullname ), CreatedByExternalParty ( $select= fullname )
If I query the EntityDefinition for each of the above two fields, I can't any difference between them in terms of metadata:
"@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata",
"Targets": [
"externalparty"
],
"Format": "None",
"AttributeOf": null,
"AttributeType": "Lookup",
"ColumnNumber": 230,
"DeprecatedVersion": null,
"IntroducedVersion": "8.0.0.0",
"EntityLogicalName": "account",
"IsCustomAttribute": false,
"IsPrimaryId": false,
"IsValidODataAttribute": true,
"IsPrimaryName": false,
"IsValidForCreate": false,
"IsValidForRead": true,
"IsValidForUpdate": false,
"CanBeSecuredForRead": false,
"CanBeSecuredForCreate": false,
"CanBeSecuredForUpdate": false,
"IsSecured": false,
"IsRetrievable": false,
"IsFilterable": false,
"IsSearchable": false,
"IsManaged": true,
"LinkedAttributeId": null,
"LogicalName": "createdbyexternalparty",
"IsValidForForm": true,
"IsRequiredForForm": false,
"IsValidForGrid": true,
"SchemaName": "CreatedByExternalParty",
"ExternalName": null,
"IsLogical": false,
"IsDataSourceSecret": false,
"InheritsFrom": null,
"CreatedOn": "1900-01-01T00:00:00Z",
"ModifiedOn": "1900-01-01T00:00:00Z",
"SourceType": null,
"AutoNumberFormat": "",
"MetadataId": "827e9002-b547-49fc-9e8d-a6b1cfcef33b",
"HasChanged": null,
"AttributeTypeName": {
"Value": "LookupType"
},
"@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata",
"Targets": [
"systemuser"
],
"Format": "None",
"AttributeOf": null,
"AttributeType": "Lookup",
"ColumnNumber": 52,
"DeprecatedVersion": null,
"IntroducedVersion": "5.0.0.0",
"EntityLogicalName": "account",
"IsCustomAttribute": false,
"IsPrimaryId": false,
"IsValidODataAttribute": true,
"IsPrimaryName": false,
"IsValidForCreate": false,
"IsValidForRead": true,
"IsValidForUpdate": false,
"CanBeSecuredForRead": false,
"CanBeSecuredForCreate": false,
"CanBeSecuredForUpdate": false,
"IsSecured": false,
"IsRetrievable": false,
"IsFilterable": false,
"IsSearchable": false,
"IsManaged": true,
"LinkedAttributeId": null,
"LogicalName": "createdby",
"IsValidForForm": true,
"IsRequiredForForm": false,
"IsValidForGrid": true,
"SchemaName": "CreatedBy",
"ExternalName": null,
"IsLogical": false,
"IsDataSourceSecret": false,
"InheritsFrom": null,
"CreatedOn": "1900-01-01T00:00:00Z",
"ModifiedOn": "1900-01-01T00:00:00Z",
"SourceType": null,
"AutoNumberFormat": "",
"MetadataId": "b863fe8a-6393-42ec-a540-972d3b45bd7b",
"HasChanged": null,
"AttributeTypeName": {
"Value": "LookupType"
},
Any help would be great, thanks.