Blog

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 license change opening up for a 10$ CRM system?

Power Platform is maturing rapidly, and users are really loving the new platform for citizen development. The only natural thing to do for Microsoft was to alter the licensing model now that they see how users are working with the platform.

Normally I am the first one to hate on all changes, but this time I am not sure I hate it. I am actually seeing some opportunities here that I didn’t see before.

https://powerapps.microsoft.com/en-us/blog/new-licensing-options-for-powerapps-and-flow/ <– Read about the statement here.

I am seeing this from a Dynamics perspective, and not Office. There are 2 different ways of viewing this change.

From what I read, we can now setup a 10$ pr user pr month and create a sales app with both Model Driven and Canvas AND Portal. Within the app we are also capable to run as many flows as we want without the need for a FLOW plan.

You might still need one Enterprise or Proessional license in the bottom for the entities to be installed on the CDS, but after that you can create your own simple apps.

NB!
I am sure that Microsoft will introduce some other restrictions later on to separate the apps (Sales, Customer Service etc), but currently this is not the case.

Anyone share their ideas about this change? 🙂

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