Its #FriYay! For every click saved in your work is a productive second put into good use!
From what I have seen, users expect to complete a certain operation in and around 2 clicks. For instance, consider assigning a record in CRM to another user/team – this would pretty much take 4 clicks. How can we simplify this to do the assign operation in just one click? How about a PCF control on an entity form which lists down all the users/teams in an autocomplete text box, where users could do a wildcard search from the list, further pick the assignee and just click on the control’s ‘Assign’ button? Sounds cool? See, we could assign a record in just one click 😀
Another PCF quickie before I go for lunch today 😛 A simple on-demand address data retrieval using Gothere.Sg API. Folks in Singapore, can make use of this 🙂 Embed the control on to the form and you’re good to go 😀
Always wondered if we indeed need a WhatsApp widget on customer form such that we can draft the message and send WhatsApp direct message to the customer right from the Customer form itself. Further you may also create a SMS activity for the same customer too.
Here in the demo, I’m making use of the free WhatsApp API to launch WhatsApp web and send the message.
N.B: For some reasons, the WhatsApp font awesome icon isn’t rendering with 500 GET error. But that can be sorted 😉
Its been a month since Microsoft announced about this, now it has been released for public preview. Do note that this is a preview feature and not meant to be used for production purpose.
The most commonly asked question after the advent of PowerApps is how do we take it to external users. Well, Microsoft heard you! PowerApps Portals is the answer for you 🙂
PowerApps Portals let you build low-code, responsive websites which lets external users to interact with the data stored in the Common Data Service and Dynamics 365 environments directly from https://make.powerapps.com
The template designs that come along with PowerApps portal are pretty much the liquid templates, thus, a developer with Dynamics Portal working experience will find the PowerApps Portal quite easier to customize.
Here in this blog which I will keep it very light – after setting up the PowerApps Portal, lets try to create a web page which connect to Contact entity (CDS) and lists all contacts. Let’s keep it real simple for now.
Select ‘Portal from blank (preview)’
Proceed to create the portal with a nice name 😛
You can see the progress right up there in the notification pane
It will take a while, it’s not very instant. You’ll get notified when it ready so that you don’t have to worry about refreshing the page to see the status 😛
Alas, the much much awaited portal is here
Yes, it’s responsive too.
Let’s do the customization and configuration of the portal
Clicking on ‘Edit (preview)’ takes you to WYSIWYG portal designer mode.
Let’s create new page by going to ‘New page’ -> ‘Blank Page’
Insert a List component on the page.
The list control is now added to the page.
Set properties to the list control as below:
Save the change and click on ‘Browse Website’. That’s a simple page creation to show list of contact.
You may play around with other properties bounded to the list control.
In addition this, we have Dynamics 365 Portal where in if your environment contains Dynamics 365 for Customer Engagement apps, you can create the portals mentioned in Portal templates.
Select the required portal template. The creation process is same as earlier what we did for PowerApps Portal for CDS.
The supported browsers currently are:
You may also choose to share or delete the portal. For sharing the portal to internal users, it is recommended to have a System Administrator or at least a System Customizer security role in the corresponding Common Data Service database.
Finally, you can create only one portal of each type in an environment per language. If you try to create more than one portal, you’ll see an error message as follows:
To create more portals, you must create a new environment using the create new environment link in the error message.
I hope this blog serves as a starting point to kick start your interest in PowerApps Portals whilst I try to explore more on the PowerApps Portal and keep sharing my knowledge here.
Developer command prompt of Visual studio 2017 or later
Step 1: Project setup
Open Developer command prompt of Visual studio 2017 or later
Navigate to any local directory
Run the below command:
pac pcf init –namespace <specify your namespace here> –name <put component name here> –template <component type> (do note there are two hyphens)
For instance: pac pcf init –namespace CaseTimerControl –name CaseTimerControl –template field
“namespace” is the namespace that you want to provide for
“componentname” is the name of the control. “template” – Being it a pre-release, only two values are supported for this – field and dataset
Project is now successfully created
Run the command “npm install” as advised. It will install all the dependencies
Dependencies are installed successfully
Your project folder will look like below:
Step 2: Setup Manifest file of the custom control
We will just focus on two files under the below folder.
Open the ControlManifest.xml in any suitable xml editor of your choice. I used notepad++
What does a Manifest file mean, it is a file which contains metadata of a control. For example, the files of a computer program may have a manifest describing the name, version number, license and the constituting files of the program.
The ControlManifest.xml file would look like below:
Let’s look at each xml tag in detail.
In the <control> tag:
1. The ‘namespace’ and ‘constructor’ share the same name of the framework project we created earlier.
2. ‘display-name-key’ – the display name which will appear for the control in CRM. I used ‘TimerControl’
3. ‘description-key’ – the description for the control while will appear in CRM. I used ‘TimerControl’ again.
The control tag in the xml file would now now look like:
Next, we need to set the properties for the control to which this control would be associated to:
I will associate the field type ‘SingleLine.Text’ for this control – meaning in CRM, for the field of data type ‘SingleLine Text’ – this custom control can be used.
In the <property> tag, below element signifies:
name – the name of the property
display-name-key – the name of the property which will appear in the CRM when this control is configured
description-key – Description for the property to appear in CRM
usage – three values are allowed: bound, input or output. It is used to determine if the property is meant to represent an entity attribute that the component can change (bound) or read-only values (input)