Wednesday, February 2, 2022

Get office 365 User Email Address powerapps

 Introduction:

In this blog, we will see how to get office 365 user details by filtering logged in user

Implementation Steps:

 

1. Login in to https://make.powerapps.com


2. Create or Open Existing Application


3. Add Office365User Datasource




 











4. Now Add a text field to Populate some details from Office 365.


5. How to Get user Email ?

 

                 User().Email  //Using this syntax we can get email address of user


6. How we can get the Office 365 user Details from PowerApps?


First(Office365Users.SearchUser({searchTerm:User().Email})).UserPrincipalName) // Get User PrincipalName

First(Office365Users.SearchUser({searchTerm:User().Email})).DisplayName) // Get User Display Name

First(Office365Users.SearchUser({searchTerm:User().Email})).Mail) // Get User Mail

First(Office365Users.SearchUser({searchTerm:User().Email})).City) // Get User City


Above i have provided some sample details, you can get more details too :)


Translate Text in Dataverse using AI Builder

Introduction:

In this blog, we will see how to translate text in dataverse using AI Builder

Implementation Steps:

 

1. Create a New Table (Table Name : Translate Text)

 

2. Create Fields

 

         1. Basic Text Name (Datatype : text)

         2. Translated Text (Datatype : text)

         3. Basic language (Datatype : text)

 

3. Once Filed Creation done, add the fields into the Form

 

4. Now Navigate to https://flow.microsoft.com

 

5. Create a New Automated Flow and Select Triggering Point as Dataverse

 

rampprakash_0-1643741610654.png

6. Once Page Gets Loaded do the Following mapping

 

rampprakash_1-1643741650886.png

 

7. Now Search for AI Builder by clicking + Symbol

 

rampprakash_2-1643741686171.png

 

Pass the Text as Basic Text from Dataverse and Converted language to English and Translated From (Auto Detect)

 

8. Now Update the Translated value and base language to Dataverse

 

rampprakash_3-1643741761084.png

 

That's it :slightly_smiling_face:

 

Output Record below 

 

rampprakash_4-1643741788780.png

 

 

For Step by step Guidance, please find my video below

 


Saturday, January 29, 2022

Create HTML Table with Border while sending Email using Microsoft Flow

Introduction:

In this Blog, we will see how to send email with Border while Sending email using Microsoft Flow

Implementation Steps:

 

Usually when we send an email with HTML Table Body Microsoft Flow cannot generate Table Border. Below is the Sample Screenshot how the Table will be

 

Microsoft Flow HTML Table With out Border :

 

rampprakash_0-1643394171527.png

 

 

Microsoft Flow HTML Table with Border:

 

rampprakash_1-1643394333251.png

 

How Can we Achieve this?

 

Open/Create Microsoft Flow --> Open Your Email Notification weather it is Outlook or Send Email Notification

 

First Create Data Operation and Create a HTML Table

 

rampprakash_3-1643395307252.png

 

 

Click Code View

 

rampprakash_2-1643395172043.png

 

In the Email Body

 

rampprakash_4-1643395429801.png

 

Create a <table>Pass your Output Value here</table>

 

HTML Code:

 

<head>
<style>
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}
</style>
</head>

 

That's it 

Thursday, January 27, 2022

Increase / Maximum file size limit for Attachments in Dynamics 365

Introduction: 


In this Blog we will see how to set the Maximum size for the attachments and how to increase size for the attachments.


Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

2. Click Gear Icon at the Top --> Select Advance Settings 

 

3. It will open Settings Page --> Select Administration

 

rampprakash_0-1643281083033.png

 

4. Click System Settings

 

rampprakash_1-1643281105499.png

 

 

5. Once Page Loaded Select EMAIL Tab

 

rampprakash_2-1643281145920.png

 

Select Maximum file size (in kilobytes) and Increase the Size the Of the Attachment.

 

Now Lets see what is the Maximum Size the System will Allow

 

rampprakash_3-1643281203598.png

 

Based on Dataverse Environment it will only allow Values between  0 through 131,072.

 

Now Let's See how to Block Unwanted Field Extension Attachments.

 

Click General tab --> Look for Set blocked file extensions for attachments

 

rampprakash_4-1643281307135.png

 

That's it :slightly_smiling_face:

Friday, January 21, 2022

Get Year Difference between 2 Days using Microsoft Flow

 Introduction: 

In this blog we will see how to count between 2 dates using Microsoft flow

 Implementation Steps:

 

Consider I want to count how many years of experience an Employee have (for Eg) 3 Year experience

So here in my scenario I want to Calculate Today's Year - Employee Joining Year

 

As Starting get the Current Year in a Variable

 

 

 

utcNow()

 

 

 

 

rampprakash_0-1642784192695.png

 

The Next step get the Current Year from the Current Date- for that use Substring

 

 

substring(variables('Get Current Date'),0,4)

 

 

 

The same way based on your Dataverse or SharePoint List get the Joining Date of Employee

 

rampprakash_0-1642784473728.png

 

As per Above Image, get the State Date and store it in Variable then As said before use subString to get the Year of Joining Date

 

 

substring(variables('Get Anniversery Date'),0,4)

 

 

Now Convert the Variable to int and use sub to get the Count between 2 dates

 

rampprakash_0-1642784664646.png

 

sub(int(variables('Get Current Year')),int(variables('Get Anniversery Year')))

 

That's it :slightly_smiling_face:

Friday, January 7, 2022

Error Handling in Canvas PowerApps with DataVerse Environment using IfError


Introduction:

In this Blog we will see how to Handle error in Canvas PowerApps with DataVerse Environment using IfError


Implementation Steps:

 

Consider a Scenario, we are having 2 tables one is with Account and another with Opportunity

 

How to Implement Restrict in Dataverse Environment. : https://microsoftcrmtechie.blogspot.com/2022/01/restrict-record-deletion-if-child.html

 

While Deleting Account if any Opportunity Contains Data then we need to Restrict in PowerApps.

 

This Restriction will work Perfectly in Dataverse 

rampprakash_0-1641546671931.png

 

In PowerApps Canvas if you tried to delete the system won't throw Error, lets see how to handle that

 

Open Canvas App then Click File then settings 

 

Click Upcoming Features and Toggle On --> Formula-level Error Management

 



 

Now Write below code in Delete Button

 

IfError(Remove([@Accounts], BrowseGallery1.Selected),Notify("Record Contains Child Record"),Notify("Deletion Success"))

 

Thats it :slightly_smiling_face: This will throw error if any error occurs 

 

rampprakash_3-1641547005068.png

 

Restrict record deletion if child Record Available in Dataverse or MSCRM Environment


Introduction

 In this blog we will see how to Restrict user to delete Record if child record available

Implementation Steps:

 

Consider we are having 2 Entities

  • Account  --> Parent
  • Opportunity --> Child 

Opportunity Table Contains Lookup to account Entity.

 

Now do the below steps to Restrict Account Deletion if any Opportunity Available

 

1. Navigate to https://make.powerapps.com

2. Click Dataverse

3. Select Tables

4. Open Account(in my scenario Account is Parent)

5. Click Relationship --> Open Account to Opportunity Relationship --> Click Delete Drop Down --> Select RESTRICT

 

rampprakash_0-1641545694772.png


If you tried to delete Record you will get below error



If you tried to delete the Record you will get below error

 

rampprakash_0-1641546629775.png


 

 

That's it :slightly_smiling_face: 

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...