Showing posts from January, 2020

Use Dynamics WebAPI to get Record Count

Use Dynamics WebAPI to get Record CountWhen working in an environment where tools like XrmToolbox are not available or allowed getting a total record count can be a real pain sometimes. One way of doing it just using the browser involves using the Dynamics WebAPI. This came in handy last time we were doing a data load on our production system and wanted to see the status of how many records had been imported.Small Data Set ( < 5k)If you are trying to get the count for 5,000 or less records. you can do a simple count on the data.Format/api/data/v9.0/<Entity Set Name>/?$count=trueExample/api/data/v9.0/contacts/?$count=trueData Returned{"@odata.context":"$metadata#contacts","@odata.count":3,"value":Large Data Set ( > 5k & < 50k)If your record set will have 5k or more you can utilize the webapi by creating a FetchXml aggregate query, this does have a limitation of 50k records.Query Form…

Use Dynamics WebAPI to get LogicalName or ObjectTypeCode for Entity

Use Dynamics WebAPI to get LogicalName or ObjectTypeCode for EntityIf you need to get the LogicalName or ObjectTypeCode of an entity in your Dynamics environment you can utilize the WebAPI to get the metadata.If you have the LogicalName of the entity you can use this url.
<Dynamics Url>/api/data/v<Version>/EntityDefinitions(LogicalName='<LogicalName>')?$select=ObjectTypeCodeExample:'account')?$select=ObjectTypeCodeData Returned:
{"@odata.context":"$metadata#EntityDefinitions(ObjectTypeCode)/$entity","ObjectTypeCode":1,"MetadataId":"70816501-edb9-4740-a16c-6a5efbc05d84"}If you have the ObjectTypeCode of the entity you can use this url.Format:
<Dynamics Url>/api/data/v<Version>/EntityDefinitions?$filter=ObjectTypeCode eq <ObjectTypeCode>&$select=Logic…

Bing Maps PCF Control

Bing Maps PCF ControlOverviewThis PCF control allows you to display information for a view that contains latitude and longitude information within Bing Maps. The Info Box for each pushpin that is created on the map also gives you the ability to open the selected record.Additional FeaturesMap will default to a bounding box defined by the location data being shown.Will work with dataset that are 5k+ in size.DownloadThe latest release is always available here.