PowerApps + CSS

I know the title be a little misleading. PowerApps doesn’t support CSS as of now (maybe sometime in future), but you can create a CSS light for simple tings while we await the custom Themes for PowerApps.

I find it extremely annoying when creating a large app and you need to customize visuals. If you make a change to one “screen” you have to make the same change over and over again.

In this example I declared a few variables in the beginning of the PowerApp, and one of these is the button color “RED”.

As you can see, my button color will be read when I choose to give them this color.

So at some point I decide that I want the color to be the same as my heading, and all I have to change is the color code in the app “onload”.

The result is matching buttons without having to manually change each color setting!:)

NB! after changes in the “onload”, you have to refresh the browser to see the effect.

Using Flow to copy Document Location

One confusing obstacle with a new CRM system, is the connection between Dynamics CRM and SharePoint. As a consultant I often have to demonstrate what is really happening behind the scenes to justify why this isn’t straight forward. We have to tell the customer about different folders, different entities etc, while they simply don’t care. They just want it to work together.

One particularly interesting point is when they move between entities. Why can you work with documents in the Lead, and when you navigate over to Opportunity, you no longer see your sales documents? Technically I understand why, but from a functional perspective I understand the customer.

Recently I ran into this scenario when implementing Field Service. Sales produced documents what were important throughout the whole cycle Sales -> WorkOrder -> Assett. Navigating between the entities takes to long, so the challenged me to find a solution.

FLOW TO THE RESCUE ❤

When the opportunity was done, we needed to create 1 or more WO in Field Service. Important factor was to maintain all the work done in Opportunity with the documents, so the Field Service Technicians could see everything in one entity (WO).

Challenge: When I create a new Work Order from Opportunity, I need to copy the document location from the originating Opportunity.

Flow begins with a simple trigger. When a WO is created.

Then I check to see if the related Opportunity contains data. This is just to make sure that the WO actually is created from a Opportunity.

Then I needed to get the document location regarding the Opportunity. As you can see here I am only returning 1. There won’t be any more document locations on Opportunity the way they are using it now. If you wonder how to filter, check my other post LIST CDS RECORDS IN FLOW

This is where I create a new Document location, and set the Work Order as regarding. Flow will automatically add “FOR EACH” to loop through. In my case it doesn’t matter, because I only have 1 document location from Opportunity.

What the user sees

This is a new Opportuinty

The opportunity has documents related to it.

I then convert the opportunity to Work Order via the button in ribbon. I get a message when this is complete.

I open the document location of Work Order, and VIOLA, the same documents.

Personally I love finding quick wins like this that mean a lot for simplicity. Any CRM application will be complex for the end user, so these parts help:)

PowerApps Currency Formatting examples

So far I feel that currency formatting in PowerApps seems to be a little troublesome. Sure everything would be great if we all sold in $ and our offers were all huge! All of the examples out there are based on this. I needed to represent values at 1 NOK and up. In Norway we don’t use “,” for separating thousands.

I am sure there are simpler ways of doing this, and I am hoping someone can fill me inn:)

For US formatting I found this one:

Text(CurrencyField,"[$-en-US]$###,###")

For UK formatting I found this one:

Text(Value(Parent.Default),"[$-en-US]£#,###.00")

For me I need to format PowerApps currency NOK. I have tried manipulating all of the above with no luck at all. Have no idea what I am doing wrong, but that doesn’t matter. I finally found one that worked for me

NOK PowerApps Currency Formatting:

Text(ThisItem.'Est. Revenue',"[$-nb-NO]## ### kr", "nb-NO")

None of this is really making much sense to me. If you have more information about this, please do share!!:)

Composite fields in PCF?

Ohhhh how I miss the Composite fields in dynamics<3

It was introduced in 2013, but was never given much love. It was one of those changes the customers loved, but always wanted to configure. This resulted in many strange javascripts that I personally refused to use. Now that the new UI is being forced upon us, the field will disappear it seems, and that is too bad. The new UI is fine, but it is not as efficient with screen space yet, fields like this actually make a lot of sense.

https://community.dynamics.com/crm/b/cosmanscrmjourney/posts/crm-composite-fields
https://community.dynamics.com/crm/b/cosmanscrmjourney/posts/crm-composite-fields

What about PCF?

First of you need to see that PCF controls can do. Free community examples have been release here: https://pcf.gallery/ – by Guido Preite

So can PCF controls be the answer to this? I have no idea, but would bee cool if someone with developer experience could answer me:)

CDS List Records Filter Query using Flow

This week I needed to use the List Records function, and I realized that I had no idea how to use the filters. Thank you Jonas Rapp for creating the FetchXML Builder!! The function “Flow List parameters” saved my day:)

Simple filters

Let’s begin with the simple filters where I get a contact with the last name of Sandsør

Test your search result with the Execute button so see that anything is actually returned. Then open the Flow List Parameters

The tool converts the Fetch XML, and magically gives the correct filter to add in our FLOW query. It can’t get much simpler than that!!

Lookups

Lookups act a little bit different with the syntax, as lookups always to. This got me quite confused before finding this tool, because I was not getting match to my result.

I am searching for contacts with a given GUID. In my case I didn’t know what the GUID was, so I randomly generated a GUID for the formula. In FLOW I substituted the GUID part of query with a dynamic variable.

Filter Query with lookups, you need to add “_” as seen above. When working with lookup you won’t get at match without the “_LookupField_Value”.

Filter linked entity

The last filter is a little more complex, and might not get used due to some limitations of Odata (Must match on unique ID for related).

In this scenario I wanted to locate all contacts with last name “Sandsør” where the regarding accountID = GUID.

Choose the main entity on top, and add “link-entity”

Make sure you have the correct relationship here. Some Lookups support more than one entity, and therefore you make sure you have the correct one.

Again we find the magic with the “Flow List Parameters“.

In this scenario we also get Expand Query result that we need to copy/paste.

Apply to Each

Once you have figured out what filter to use, you can select the “Apply to Each” function, and add custom logic in here.

Interview – Julian Sharp

Julian Sharp was recently in Norway to teach the App in A Day. I was one of the lucky few that got a spot in his class. Sure I have been in Dynamics since 2007 and should know it all, but that is the only once certainty. I will never know it all, and there is always something to learn from a person that has a different perspective on things.

Thank you Julian for the great class, and the advice during the interview! See you again soon in Oslo for the PowerSaturday August 24th.

Follow Julian in the following channels
Blog
Twitter

PowerApps and Microsoft, Where does it fit?

While some people say that PowerApps is Office, others will say PowerApps is Dynamics. They are both correct.

Canvas

Canvas apps si exactly what it sounds like, a blank canvas you create. Here you can choose where to store data: SharePoint, SQL Server, Office 365, OneDrive for Business, CDS , Excel, and many other data sources. For the ease of use I often see storage within SharePoint lists here.

Model Driven

Model Driven app is essentially the Dynamics database, but without all of the bells and whistles that come with Sales/Service/Marketing/Field Service/Project Service etc. It is a clean database where you can start from “scratch” and create fairly complex applications within a short period of time.

Why make a fuss about it?

Well, if you know Microsoft as an organization you will understand me asking this question. Office is now called Modern Workplace, and Dynamics is Business Applications. PowerApps is both, so where does it belong. What team will be the ones promoting the product, and who will gain from selling PowerApps licenses?

Up-sell, Down-sell or Cross-Sell?

Office – “Up-Sell”

While Office consultants se this ass an “Up-sell” and potentially expensive
Office E3 20$ + Plan 1 7$ = 27$
+ Plan 2 20$ = 40$

Dynamics – “Down-Sell”

Dynamics sees this as a “Down-sell”
Dynamics Sales 95$ —> Plan 2 40$ = 55$ savings pr customer

PowerApps – “Cross-Sell”

If you read Jukka’s post about PowerApps maybe what we are doing is creating a bridge between it all, the “Cross-Sell”. I can no longer only focus on Dynamics, and have to embrace PowerApps Canvas and Model Driven. Eventually I think the Office users also will see the benefits of the Model Driven, and then we can start adding value inn all areas to a common database.