Environment Variable referencing Azure Key Vault secrets (Dataverse / Power Platform)


Check out the below articles –

https://docs.microsoft.com/en-us/power-apps/maker/data-platform/environmentvariables#use-azure-key-vault-secrets-preview

Within plugin https://itmustbecode.com/azure-key-vault-secrets-in-dataverse/

Within Power Automatehttps://www.msautomate.com/2022/06/16/azure-keyvault-and-power-automate/

https://powerapps.microsoft.com/en-us/blog/how-to-use-environment-variables-with-akv-secrets-in-the-ci-cd-pipeline-when-deploying-applications/

https://blog.yannickreekmans.be/environment-variable-secrets-azure-key-vault-improvement/

Advertisements

How to – Use Import Column to Upload files to File Column / Attribute in SSIS KingswaySoft(Dynamics 365 / CRM)


A few weeks back had posted on how to upload files to the File Column type field using KingswaySoft’ s Integration Toolkit and Premium Flat File Source and Premium Derived column which are part of the SSIS Productivity Pack of KingswaySoft

https://nishantrana.me/2022/03/17/how-to-upload-files-from-file-column-attribute-using-ssis-kingswaysoft-dynamics-365-crm/

Here we will see an example of achieving the same without using the KingswaySoft Productivity Pack’s Premium Flat File Source and Derived column. (although would recommend using it as it includes over 300 premium components making it easier to rapidly build efficient solutions)

https://www.kingswaysoft.com/products/ssis-productivity-pack

Below is our source file

The contact records in CRM

Below is how the package looks like

The Flat File Source points to the location where we have the source csv file containing email, file path, and file name.

Import Column takes the File Path as the Input.

For the Input and Output properties, add an output column (BinaryColumn) of DataType = image.

In the FilePath input column properties, specify the column id of the output column.

Finally, in the CDS / CRM Destination Component, we are performing an upsert using the Email id as a match.

Here we have mapped the output column of the Import Column i.e. BinaryColumn to the binary content field of the file type attribute of the CRM.

Let us now run the package.

Let us now open the records and check.

As expected we can see the file uploaded.

Also, check out –

To extract attachments from notes-https://nishantrana.me/2021/02/10/extracting-attachments-from-notes-in-dynamics-365-dataverse/

To download files using Download Block Requesthttps://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

To upload files using Upload Block Requesthttps://nishantrana.me/2022/03/15/how-to-upload-file-to-file-column-using-initializefileblocksupload-and-uploadblock-request-dynamics-365-crm/

Understand File and Image Data Typehttps://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

Try out the wonderful, feature-rich, and powerful SSIS Integration Toolkit for Dynamics 365 by KingswaySofthttps://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download

Check other articles on SSIS plus CRM – https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/

Hope it helps..

Advertisements

How to – Use Script Component to Upload files to File Column / Attribute in SSIS – KingswaySoft (Dynamics 365 / CRM)


A few weeks back had posted on how to upload files to the File Column type field using KingswaySoft’ s Integration Toolkit and Premium Flat File Source and Premium Derived column which are part of the SSIS Productivity Pack of KingswaySoft

https://nishantrana.me/2022/03/17/how-to-upload-files-from-file-column-attribute-using-ssis-kingswaysoft-dynamics-365-crm/

Here we will see an example of achieving the same without using the KingswaySoft Productivity Pack’s Premium Flat File Source and Derived column. (although would recommend using it as it includes over 300 premium components making it easier to rapidly build efficient solutions for different scenarios)

https://www.kingswaysoft.com/products/ssis-productivity-pack

Here we will be using Script Component to read the file from the path and convert it to DT_IMAGE.

Below is our source file

The contact records in CRM

Below is how the package looks like

The Flat File Source points to the location where we have the source CSV file containing email, file path, and file name.

Script Component has File Path and File Name as the input.


Add a column using Add Column in the Output Columns, with Data Type as image [DT_IMAGE]


Click on Edit Script..

Add the below code to read the bytes from the file path and add it to the output column.

Finally, in the CDS / CRM Destination Component, we are performing an upsert using the Email id as a match.

Here we have mapped the output column of the Import Column i.e. DerviedFileContent to the binary content field of the file type attribute of the CRM.

Let us now run the package.

Let us now open the records and check.

As expected we can see the file uploaded.

Also, check out –

To extract attachments from notes-https://nishantrana.me/2021/02/10/extracting-attachments-from-notes-in-dynamics-365-dataverse/

To download files using Download Block Requesthttps://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

To upload files using Upload Block Requesthttps://nishantrana.me/2022/03/15/how-to-upload-file-to-file-column-using-initializefileblocksupload-and-uploadblock-request-dynamics-365-crm/

Understand File and Image Data Typehttps://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

Try out the wonderful, feature-rich, and powerful SSIS Integration Toolkit for Dynamics 365 by KingswaySofthttps://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download

Check other articles on SSIS plus CRM – https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/

Hope it helps..

Advertisements

How to – use Associate Entities and Disassociate Entities Event in Audit to check Security Roles changes in Dynamics 365


Let us assign the System Customizer role to the user John Denver save it and then remove the same.

Let us check the Audit records generated for it.

We can see 2 records with event Associate Entities and Disassociate Entities with security role name – System Customizer created in the Audit Summary View as shown below.

Here the entity will be Security Role.

Let us assign 2 more roles to the user.

As expected we can see 2 records, with event Associate Entities.

Now let us see what happens when we update the Business Unit of the user. If you remember, assigning a new business unit removes all the existing security roles of the user.

Well this can be controlled now through DoNotRemoveRolesOnChangeBusinessUnit
setting – https://nishantrana.me/2022/01/05/how-to-change-users-business-unit-without-removing-the-security-roles-in-dynamics-365-powerapps-enableownershipacrossbusinessunits-setting/

Here we have changed the business unit of user 2, he had salesperson, system administrator, and system customizer roles assigned.

We can see the business unit change is recorded.

From Audit History of the user record – we can check all the Associate Entities and Disassociate Entities record that will give us the details of the previous Security Roles user was having before the Business Unit change.

sr

 

Other related Audit articles –

Hope it helps..

Advertisements

How to – Use Power Apps Ideas (preview) to generate Power Fx Formulas.


Let us have a quick look at the powerful Power Apps Ideas feature with a few examples.

Power Apps Ideas feature works for –

  • Items property – Gallery and Data table control.
  • Data Sources – Microsoft Dataverse, Microsoft Lists, Excel, SharePoint.
  • Data Types – Text, Whole Number, Decimal Number, Date and Time, Choice, Boolean.
  • It is only available in environments in the US region with en-us as the browser’s default language.
  • Check the list of supported Functions

The feature can be controlled from the Settings within the App.

Let us check some of the examples of natural language transformation to Power Fx Formulas.

We have a sample canvas app with the gallery control bound to Contacts (Dataverse).

Select the Gallery control, and navigate to the Ideas tab.

Let us first sort the contacts by Last Name. As we type we get the IntelliSense support.

We have our condition ready to sort by Last Name now let us click on Get ideas.

We can see the formula generated for the same. We can click on Appy to apply the formula.

As a result of applying the formula, we have the contacts sorted by Last Name.

Let us try a filter – filter contacts where the first name starts with N.

On applying the formula, the result –

Another example of a filter based on Created On.

Filter based on text –

Filter with multiple And conditions –

At times we would have to tweak the generated formula to get the desired result if it is interpreted differently.

We saw the transformation of the natural language, now let us check the transformation of the examples to Power FX Formulas, for this let us select the fields inside the gallery.

As an example, if we only want the initials of the first and last name instead of the full name, we can change the name to the initials and click on Get Ideas.

Let us change it to C M, followed by selecting Get ideas and Apply.


Next, let us change the date format to include the seconds part and the name of the month.

From –

Here we added the name of the month and the seconds in the example and clicked on the Get ideas, which generated the formula, followed by Apply.

We can see the result as expected.

Thus Power App Ideas make it easy for users to quickly apply the correct formulas using natural language and examples.

Get all the details here – Power App Ideas

Hope it helps..

Advertisements

How to – Add users to the Queue – using Manage NN relationships XrmToolBox Plugin and AddPrincipalToQueueRequest (Dynamics 365)


Recently we implemented Unified Routing for one of our projects, and as part of testing we were supposed to add multiple users to different queues (advanced queues in case of unified routing).

So we were looking for a way to do this either through any existing tool or programmatically.

Well, using the Manage NN relationships XrmToolBox plugin we can add users to the queue.  (Thanks to Prashant for suggesting this)

Just as an example, we want to add the below users

to the following Queue named Test, which currently has only one user added to it.

Below is the sample CSV file we have created having the name of the Queue and the email id of the users to be added.

Now let us open the Manage NN relationships tool and specify the appropriate values there.

Here we have specified the First Entity as Queue and the Second Entity as System User.

For Queue we have selected Name and for System User, we have specified Primary Email as the attribute to be considered while importing the data.

Click on Browse and load the file, followed by a click on the Import button to start the process.

As we have received the Success result, let us refresh our Queue to see if the users were added to the Queue or not.

As expected we can see the users added to the Test Queue.

We can also add users programmatically by using the AddPrincipalToQueue Request class.

We need to populate the Principal and QueueId property as shown below.

More on AddPrincipalToQueueRequest.

Hope it helps..

Advertisements
%d bloggers like this: