Tip #1326: Video Guide to Installing 2020 Wave 1 Preview

Dynamics 365 and Power Platform 2020 Wave 1 is coming in April. To get ready for it we are putting together some video guides to some of the new features.

In the first video tip from the series we cover installing the 2020 Wave 1 preview, including how to create a canary environment and installing the preview.

Watch the video here

Tip #1323: Kill the case customer field

The “Customer” field on cases is a bad idea, and you can’t change it to not-required. I just want to add a lookup to accounts and automatically populate the customer field.

Anonymous reader “Meve Stordue”

You can’t make the customer field non-required, but it is possible to replace it with an account lookup and automatically populate the customer field with the account selected in the custom lookup field.

Read the tip

Tip #1321: Formatting currency values in Power Apps portals

Dollars are dollars are dollars. Until they’re not. I’ve been working on the portal implementation where pricing can look like this:

(Those are UAE Dirhams, if you must know)

Forms seem to be fine but any custom layout, uhm, is suddenly very challenging. I can get values without any issues but can’t format them for display. Before long, an SOS is sent:

Folks, can’t figure out how to get formatted values from fetchxml in liquid. Is it possible at all? 

— some random dude who knows bugger all about portals, let’s call him “George”, for example.

Mighty portallers like Nick Doelman, Colin Vermander, and Andrew Butenko chimed in. Redacted list of their suggestions:

  • Do a join to currency and bring currency sign (g.d. – that would only work half way as the currency sign doesn’t give me a proper localized currency formatting. Where do I put the sign, front or back? Do I use dot or comma as a decimal separator? )
  • Maybe it’s a limitation in the Liquid implementation (g.d. – duh!)
  • Write a plugin to output to another field (g.d. – ugh, did someone said #lowcode?)

It’s been a while since I wrote a half-decent plugin so I decided to dig into the portal source code instead (and you can too). Lo and behold, there are undocumented filters that do exactly what’s needed.

format: format, [culture]

Takes a format string and an optional culture, making it possible to write something like:

<blockquote>
My income is {{ 12345.005 | format: "C", "en-US" }} 
before tax. When I grow up and move to south of France, 
I will earn {{ 67890.049 | format: "C", "fr-FR" }} 
per week.
</blockquote>

Which produces a nice but totally fictitious statement:

My income is $12,345.00 before tax. When I grow up and move to south of France, I will earn 67 890,05 € per week.

currency: entity, attribute, [format]

Format is great but still leaves us with the task of figuring out the currency of the record, etc. Enter currency filter that “formats a given numeric value according to the CRM currency settings for a given record and entity attribute”. Easier to demonstrate:

{% assign q = entities.quote[params['id']] %}
<blockquote>The quote total value is 
{{ q['totalamount'] | currency: q, "totalamount" }}
</blockquote>

That produces something like

The quote total value is £1,234,567.89

The other useful currency and decimal filters include:

basecurrency: [format]

Formats a given numeric value as representing a value in the organization base currency.

invariantculturedecimalvalue: decimals

Returns the unformatted/culture invariant value for a decimal number up to a specified number of decimal places

maxdecimals: decimals, [culture]

Formats a decimal number using specified number of decimals and culture. Strips out trailing zeros and the decimal separator if possible.

decimals: decimals, [culture]

Formats a decimal number using specified number of decimals and culture.

Cover photo by Disha Sheta from Pexels

Tip #1320: Keep in touch

&tl;dr

We are back, tons of tips in the pipeline, promise to keep in touch, new stuff coming, first BAD Masterclass of 2020 is just over two weeks.

Tell me more

We are back after month and something hiatus.

Not that we did nothing in these few week, just the opposite. But we should’ve posted an update or a notice but we didn’t and for that, we are sorry.

When kids are travelling these days we rarely ask them to write or call on a daily basis. All we want is for them to keep in touch. “We are here and we are OK”. CRM Tip of the Day, our beloved child, is here and it’s ok. It’s just grew up a few inches/centimetres over the break.

Touch in today’s world is everywhere. Touch-screens, touch-optimized, touch-only, do not touch. For some people touch is the main sense. Keeping in touch as important as keeping others informed of a progress.

Sometimes the progress you report could be as simple as “still working on it” and it’s just as important as reporting something “done”. You keep others informed.

When you commit to something, it’s your responsibility to account what are you up to. You may account to your project manager, or yourself – all depends on that “something”.

You become responsible forever for what you’ve tamed. You’re responsible for your rose.

Antoine de Saint-Exupéry, The Little Prince

What’s cooking

We have grand plans for 2020. Some rebranding, revitalization of our YouTube channel, forays into new technologies and topics.

BAD Masterclass 2020 Promotion

And then, of course, there is BAD Masterclass. People gave us the feedback that at times masterclass was a bit too much. We decided to get rid of “a bit” and condensed everything we want to talk about, into a single day. Enter BAD Masterclass Ramp-up Edition. Save yourself both time and money and get up to speed on Power Platform in under 9 hours.

London and Glasgow are in just over two weeks, go ahead and register!

Good to be back and stay tuned!

Cover photo by unsplash-logoPhix Nguyen

Tip #1319: Double the single quotes

tl;dr

If you have email addresses coming from somewhere and you’re using them in Power Automate to filter and find the records, make sure to double the quotes.

Full story

One of the observations made by our lifetime tipster Jerry Weinstock was that citizens tend to create automations that follow happy path. I have to say this turned out to be valid for yours truly as well.

Am I becoming a citizen?! o__O

The Enabler

I was processing some records that came from a spreadsheet and needed to look up CDS records by email. That part of my flow looked something like this:

Happy – 3000, unhappy – 2. Diving in.

That explains it. According to RFC5322, the recipient part may use any of these ASCII characters:

  • Uppercase and lowercase English letters (a–z, A–Z)
  • Digits 0 to 9
  • Characters ! # $ % & ‘ * + – / = ? ^ _ ` { | } ~
  • Character . (dot, period, full stop) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively (e.g. John..Doe@example.com)

All of these characters are probably fine except the quote that breaks the fragile syntax of JSON land. So the expression catering for unhappy path has become:

And everyone is happy now, including the unhappy path with 6 quotes in a row.

Photo by Dominika Gregušová from Pexels

Tip #1318: Why don’t I see the “associated records” link in subgrids?

In unified interface, when you click on the more option button, you will sometimes see the the option to see the related records in the subgrid.

This is handy, especially when you want to see all of the view options, like filters.

But sometimes you might see the “see all records” option instead. This is not very handy, as it shows you all of the records in the related entity, and you don’t have all of the view options.

The reason why you don’t see the “see associated records” option in your subgrid is because you do not have the entity in the subgrid displayed on the navigation area of the form. Add the entity in the subgrid to the form navigation menu/related records are of the form on which the subgrid lives, and you can start viewing your associated records.