Flow – Create, Update or Delete trigger error

At the time of writing this post Microsoft Flow will throw an error when you create this flow with the trigger Create, Update or Delete, and the flow is standalone.

Error

This is the following error you will see when you try to create the flow (Create, Update, Delete) without any connection to a solution.

Sollution

All you have to do, is open this in a solution (for the time being).

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:)

Business Process Flow set Pipeline Phase

I was never a fan of the Business Process Flow (BPF) because of the many flaws. Sometimes I didn’t think it was easy enough, and other times not advanced enough. It simply wasn’t what I needed.

In a recent project I decided to give it another go, because the customer wanted to continue with the BPF they had from their old CRM system.

Opening the PBF now I see that there is so much new features here that I haven’t seen before. I guess most of these features are due to the FLOW platform now taking over the BPF.

Challenge: Setting pipeline phase

I know you can report on the BPF entity, but that is more complex than reporting on the opportunity entity if you ask me.

Can I set the “Phase” field on the opportunity when navigating to the next step in the BPF? Let’s see!!

I wanted to set the Pipeline Phase with BPF

Config

Open the Business Process Flow from your solution and notice a button at the bottom right “Business rules for this stage’s entity”.

Create a new Business Rule for Opportunity “Oppty – Set Pipeline Phase”.

For the first condition we check if the BPF is in the stage named Prospect.

If true, set the Pipeline Phase to “1 – Qualify”.

Repeat for the second step!

The business rule should look something like this:

Result

Let’s get back to the Opportunity. We see that it default is active on the Qualify stage in the beginning of the sales process.

Click the next stage

And there you go!!

New Found Love

So what do I think of the BPF now? Honestly, I liked it. It might be a replacement for many other JavaScripts that I have been using the later years, and that is only a good thing. In this case I was able to skip JavaScript and therefore deliver a solution with a low technical footprint:)