microsoft dynamics crm
4 TopicsPowerShell query Dynamics 365/Dataverse tables attributes
This post is related to PowerShell scripting for Dynamics 365/Dataverse. I need to export metadata for 40 Dynamics 365/Dataverse tables(entities). For each table I have the list of columns to get metadata for : eg: account (account_col1, account_col2,..., account_col270). Each of the 40 tables can contain large number of columns/attributes, but I have the column list for each entity (not all columns of these entities are required). The metadata export should contain following columns : tableName, columnName(attribute) Datatype, Max_Length, Precision, Scale, is_nullable. Datatype example can be INT, decimal, etc. (for which precision and scale apply), or varchar, uniqueidentifier for which precision and scale are 0 but is captured in Max_Length. This metadata export will help pre-create tables on the destination relational database where the actual data will be imported (data has been export separate). I can see this metadata columns in SSMS by join from sys.columns, sys.objects, but cannot do this dynamically. to create this metadata export I plan on using PowerShell. Looking for a similar PS script where can input tableName and columnName and get the 7 metadata info that I listed above for each of the table columns pairs. I found https://www.powershellgallery.com/packages/Microsoft.Xrm.Data.Powershell/2.1/Content/Microsoft.Xrm.Data.PowerShell.psm1 but was not able to find all export columns that I need (eg: Datatype, precision, scale, is_nullable). Can you help how I can get the 7 metadata columns as above for the Dataverse tables attributes? I would prefer in PowerShell. Thank you!1.7KViews0likes0CommentsMigrating files from Dynamics CRM on-premises to SharePoint Online
Hi guys, New here and would like your input. I need to migrate files from Dynamics CRM on-premises to SharePoint Online. These files consist of emails, email attachments, and annotations. These are related to a contact or an account record. I have no idea what tooling to use to migrate these files and would like some guidance from you guys. I have heard that it is possible to do using Power Automate and potentially PowerShell. Any thoughts? Thanks!1.1KViews2likes1CommentHelp In Editing Data Source Credentials in PowerShell for Power BI Embedded Dashboards in D365 CRM
Hello, We are currently migrating Power BI embedded dashboards from one Dynamics 365 CRM tenant to another. The process involves creating a new Power BI report within a workspace. Since the Dynamics 365 Solution does not support the inclusion of Power BI reports within unmanaged solutions, we have resorted to using PowerShell scripting to manage the migration. During this migration, we encountered an issue where the report IDs from the original environment remained linked when moving the Power BI embedded dashboards to the new environment. To address this, we have utilized Environment Variables to map the new report and workspace IDs appropriately. However, we are facing an issue when attempting to edit the Data Source Credentials using PowerShell scripting. Specifically, we are receiving a "Bad Request" error, as shown in the screenshot below. Here is the PowerShell code we are currently using to edit the Data Source Credentials: Connect-PowerBIServiceAccount $accesstoken = Get-PowerBIAccessToken $patchBody = '"credentialDetails": { "credentials": {"accessToken":"'+$($accesstoken)+'"}, "encryptedConnection": "Encrypted", "encryptionAlgorithm": "None", "privacyLevel": "Organizational", "useEndUserOAuth2Credentials": true }' Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/gateways/9eaed562-e9c2-46e4-91cf-276ed0947b41/datasources/f1181856-de29-4a9a-a555-a0e181cd7898" -Method Patch -Body $patchBody We would greatly appreciate any guidance or suggestions on resolving this error in the PowerShell scripting process for updating the Data Source Credentials. Thanks! Inogic Professional Services: Power Platform/Dynamics 365 CRM An expert technical extension for your techno-functional business needs Drop an email at mailto:email address removed for privacy reasons Service: https://www.inogic.com/services/ Tips and Tricks: https://www.inogic.com/blog/79Views0likes1Comment