CDS Data Binding using Knockout

In this post, I am explaining how to query data from a CDS entity and use Knockout to bind it in a model-driven app web resource. It has the following advantages:

  1. It is easy don’t require a lot of efforts (less coding)
  2. We have the flexibility to do further customisation

About demo:

Since it is demo, I have included script and link references from CDN. The focus of this post is to explain and share sample code for data binding. I m loading my web resource as a popup and have used AlertJS‘s free version for this. To keep this post short, I m not explaining how to add a button in Model-Driven App. But to summarise steps I have added JS file in my form, customised ribbon and added a button with the following code.

"use strict";
///<reference path="../mag_/js/alert.js">
var Account = (function ()
{
	return {
		LoadAccountsPopup: function (executionContext)
		{   
            Alert.showWebResource("webresource_accounts");			 
		}
	}
})();

In my web resource, I m getting data using Web API query. Data binding is done of course using Knockout and have used Bootstrap for styling. Here is code:

<!DOCTYPE html>
<html>
<head>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://ajax.aspnetcdn.com/ajax/knockout/knockout-3.1.0.js" type="text/javascript"></script>
    <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

    <script>
        $(document).ready(function () {
            var query = "/api/data/v9.1/accounts?$top=22&$select=name,telephone1,address1_city";
            var oDataUrl = parent.Xrm.Page.context.getClientUrl() + query;          

            $.getJSON(oDataUrl)
                .done(function (data) {
                    if (data != undefined && data.value.length > 0) {
                        ko.applyBindings(new AppViewModel(data));

                        debugger;
                    }
                })
                .fail(function (error) {
                    debugger;
                });

        });
        function AppViewModel(data) {
            var self = this;
            self.pingResults = ko.observableArray([]);
            ko.utils.arrayForEach(data.value, function (d) {
            self.pingResults.push(d);
            });
        }
    </script>
</head>
<body>

    <div style="overflow-x:auto;">
        <h4 class="text-center">List of Accounts</h4>
        <table id="tblContainer" class="table table-sm table-striped table-hover table-borderless">
            <thead>
            <th>Account Name</th>
            <th>Telephone</th>
            <th>City</th>

            </thead>

            <tbody data-bind="foreach: pingResults">
                <tr>
                    <td><span id="fileName" data-bind="text:name"></span></td>
                    <td><span id="fileType" data-bind="text:telephone1"></span></td>
                    <td><span id="fileType" data-bind="text:address1_city"></span></td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>

I hope you find this helpful. If you have a question please leave me a comment on my blog and I will try to assist.

Enjoy your day.

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Olena Grischenko

Based in Sydney Australia Olena is a Microsoft MVP, developer and architect. She has vast experience in software development, D365 CE and Power Platform. She is a community speaker and organiser of multiple user groups.

Tell us about yourself (experience, background, industries, community service, else)

Started as a .Net developer, I’ve been working in IT for 20 years. Have worked with all versions of D365 CE and portals. As a part of my role, I do hands-on development, integration and architecture. I also do no-code development where required. Tried multiple times to give up “coding” for more manager type of roles but was always coming back. Started working as an independent consultant last October then launched a company with my partner in January. My favourite industry is higher education. Most of my projects are free community activities. I organise BizApps Women NSW, #PowerLabs and Microsoft 365 Pro-Low-No-Code Devs user groups. Also, I’m in the committee for Dynamics 365 UG NSW.

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

Making sure this project is not set to failure from the beginning, and I’ve got a real power to make things happen by putting my effort and knowledge into it.

What delivery methodology you have found useful in projects?

Some people would say “it depends”. This is how I would like to answer too. But the truth is I am a true SCRUM believer. I had the opportunity to work with the most fantastic coach for SCRUM for Dynamics 365, Neil Benson, in one of the most successful implementations in my entire professional career.

What is one thing that can make a project successful or vice versa?

For me, the success of a project from the beginning of a project is very much predefined by a desire of key stakeholders and other key parties involved for the project to succeed. 

If people were forced to a change and they don’t believe this is the best way to go the rest of it is just a waste of their and your time. It’s tough to be a part of something which is doomed from the beginning. Unfortunately, it happened to my team and me before, and it’s a very traumatic experience.  

Give me two (or more) tips that will enhance the performance of my applications?

Don’t overthink or overcomplicate things, use the latest frameworks and SDKs which are up-to-date with security and performance updates. Make sure you understand the pros and cons of different approaches. Don’t have a solution, have more than one, understand the benefits of each.

Tell us two things (or more) which will improve the quality of deliveries?

Having a good team. Staying connected with a business and getting constant feedback.

In the context of D365 CE implementation, what does architecture means to you?

In terms of a SCRUM delivery architecture is not something predefined and one of. For me, it means it should be reviewed regularly to check if thigs we developed earlier make sense still.

What few things you consider when you are architecting or designing a solution?

Costs, licencing, maintenance and support. Scalability to a degree. I am not against “temporary” solutions, everything is temporary, but you should be aware of the price your customer is going to pay in the future.   

Tell us anything that you consider is/are the best practice(s) and everyone should follow?

There is no such thing as common sense so I can’t answer this question properly.

Share a tip of yours to boost productivity as a dev, consultant or architect?

Stay focused. Find a balance of a customer-facing and quiet time to concentrate. Both sides are crucial for a good consultant. Listen and hear.   

Tell us about a canvas app that you have built or seen which was awesome?

The most amazing ones are those built by end-users. Because they help them to solve their day to day problems.

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

I believe that the most amazing applications are still in the future. We have to make sure it’s inclusive in all possible ways.

How you analyse and build security in projects? Any tips?

Not leaving to the very end of a project?

While doing configurations, do you follow some rules or practices?

There are too many of them.

Managed or Unmanaged?

Should I say “it depends” again “? Managed – for boxed products and unmanaged – for service projects and framework type of products. It may change or even it WILL change in the future, but for me it still the rule I follow.

Early bound or late bound?

Don’t like early bound. I know it’s a bad answer, wrong even.

LINQ, FetchXML or QueryExpression?

Can I keep them all?

Realtime vs batch?

Expectation vs reality. Batches aren’t ideal, but in some cases, we may not even have API available to integrate with. It’s not like we choose. For some areas like IoT, banking, blockchain etc you don’t even think “batches”. It depends.

No code/ low code or hardcore development?

Smart code. Saying you are pro-code or pro-nocode means you are too lazy to think of the best in each case solution. You have to learn about all possibilities and consider all options.

Generally for integration which technology and pattern is your choice?

My choice is to provide my customer with the decision-making matrix, so they know their options.

Any open-source, community development, toolbox plugin that you want someone to develop?

I want to develop a per-component backup restore for the portal packages available via Portal Record Mover in XrmToolBox. But I can’t find a time to do it, unfortunately.

If you have all the resources to improve one thing in D365 what that would be?

ALM

What is one thing in model apps you consider people are not utilising its full potential?

Not sure. It depends on the client.

If you are selling D365 just by one feature, what that feature is?

It plays nicely with Office 365.

What would you advise a girl starting in IT and working with Power Platform?

“If you don’t ask questions you look like you know stuff, if you ask questions you actually know it. Don’t look smart, be smart. It’s scary to be the only girl in a room but if it’s what you like to do then be brave and follow your dream. We all hope for a better more diverse, more inclusive world. Be a part of a good change. I love Power Platform because it allows people with no dev background to start building apps and solve business problems. It can be a great way to fall in love with technologies.”

What advice will you give your younger self who is already working as a D365 CE professional?

I’ve done well by choosing it as your career path don’t worry about stopping being a hands-on person; it will never happen.

What are a few things you do to be efficient in working?

If I can’t move faster to achieve my goals, I simply move. People don’t get the concept of time. They worry about something too late to learn or do. If you start today tomorrow, you will be much further than you were yesterday, regardless of speed.

What is the best way to keep up with technological advancements and changes?

Try to keep learning fun, do more hands-on stuff. Don’t believe in everything you see/watch/hear in social media sites. Take small steps but learn regularly.

Thanks Olena.

Let’s Connect 🙂

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Rasheed Gomaa

0

Mohammed Rasheed Gomaa is a Senior D365 Techno-Functional consultant recently moved to Saudi Arabia from Sydney Australia. Rasheed has authored multiple plugins for XrmToolBox. He is now leading D365 User Group in Riyadh. I have asked him technical questions and also about D365 market in Gulf and how it is to live and work in KSA.

 

Tell us about your professional experience and how you started working with D365 CE / Power Apps? 

I have 11 years of total experience, 9 years as Dynamics CRM CE Techno-Functional consultant, I started working on Dynamics CRM since version 4. I have worked in Australia, USA, Egypt, KSA, and UAE. Currently, I am a Tech Lead in an international company in KSA. I started my D365 career as .Net Developer who did an integration task with CRM, from that time to on, I became a Techno-Functional consultant.

You recently have moved to Saudi Arabia, how is the market there?

KSA is a booming/ greenfield market, not like Australia or USA (with a lot of competition between partners and consultants). Almost all of my projects in KSA are using CE as XRM, not as modules, so we can say XRM is the main module. Then comes Customer Service and Field Service.

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

It’s based on your situation are you working for an end client or partner, but generally:

  • Set the expectations between all project parties:
  • Define the roles and responsibilities.
  • Define artefacts & deliverables.
  • A quick review of the project plan with the team & client.
  • Highlight the risks & the mitigations.
  • Make sure the scope of work is clear to all.
  • Open direct communication channels between key persons in the project.

What delivery methodology you have found useful in projects?

I prefer something between Agile & Waterfall:

For high-level requirement & architecture waterfall, and agile for development & testing.

What is one thing that can make a project successful or vice versa?

There is no magic word in this subject. Still, I believe there are multiple early signs for the failed project, so I think the management should notice this early and apply Plan B.

Give me two (or more) tips that will enhance the performance of an application?

  • Deal with performance as functional requirements.
  • Apply Load Test.
  • Remove unused data/ Plugin/ workflow/ any feature, especially auditing.
  • For on-premise env: Load Balancing.
  • In your code, be careful when you deal with:
  • Lock/ NoLock
  • ConcurrencyBehavior
  • In your plugin always use, “IOrganizationService” instance from plugin context directly.

Tell us two things (or more) which will improve the quality of deliveries?

  1. Pay attention to all “ility” family:
    • Testability.
    • Reusability.
    • Traceability.

2. Automated testing.

3. Apply gamification concept for each dev& test team individually, also avoid long ping-pong game between them.

In the context of D365 implementation, what does architecture means to you?

  1. Prepare a high-level technical solution for business requirements.
  2. Care about both function & non-functional requirements.
  3. Recommend the most suitable business models & technical tool for the project.
  4. Appy design principles.

What few things you consider when you are architecting or designing a solution?

  1. Consider functional & non functional requirements
  2. Set client expectations.
  3. Use the out-of-the-box feature as much as possible.
  4. Avoid any deprecated or not well-supported feature/tool.

Share a tip of yours to boost productivity as a dev, consultant or architect?

  1. Use tools and scripts.
  2. Before developing a feature/ tool, do a search first “don’t reinvent the wheel.”
  3. Follow best practices.

Tell us about a canvas app that you have built or seen which was awesome?

I saw/ did some POC, but still no real implementation.

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

Some wonderful POCs on chatbots/ sales/ field service. (none of them was mature enough though).

How do you analyze and build security in projects? Any tips?

  1. Review organization structure (roles, branches/offices). Based on that, you can decide to structure business units. 
  2. Select suitable Hierarchy security to control access (position or managerial).
  3. Ask the client if there are any critical fields to apply field-level security.
  4. As you cannot change the entity ownership from organization to user-team, so do enough analysis to avoid any rework.  

While doing configurations, do you follow some rules or practices?

All configuration should be done automatically by tools, scripts or even by import-export, avoid manual in environments.

Managed or Unmanaged?

It depends, but generally, if you will resell to multiple clients or publish your own IP then it must be managed.

Early bound or late-bound?

I like to autocomplete and reflection, so I use both based on the situation.

LINQ, FetchXML or QueryExpression?

FetchXML is more powerful, especially for manipulating strings 

LINQ is much easier in manipulating the objects  

QueryExpression in the runtime.

Realtime vs batch?

Based on the scenario, but usually, I prefer batch jobs.

No code/ low code or hardcore development?

Depends on the requirements and no/low code tool’s availability and maturity.

In your kingdom, what sort of testing is mandatory (add more value) and which are optional?

Mandatory:

  1. Unit Testing
  2. User Acceptance Test
  3. Functional testing
  4. Integration Testing

Optional (especially for out-of-the-box or low code tools):

  1. Load testing
  2. Automation Testing
  3. Security Testing

Generally for Integration which technology and pattern is your choice?

Depends on client environment and requirement, in general, I prefer APIs & service bus. In some cases, we can use one of the data migrations tools as an integration tool. Custom development still a good approach for some projects.

Any open-source, community development, toolbox plugin that you want someone to develop?

Dynamics 365 community is a vibrant community, we all are searching for an idea to implement.

If you have all the resources to improve one thing in D365 what that would be?

Supporting some languages, especially Arabic, Till now customer insights, Portal and AI still not support Arabic.

If you are selling D365 CE just by one feature, what that feature is?

For me it will be an application customer service or fields service may be.

What will you suggest to someone who wants to be a D365 professional?

Start it now with the online version, initially work for a partner. Be technology hungry and keep attending community events.

What advice will you give your younger self who is already working as a D365 professional?

Before 30 years old do not work on only one project more than 1 year (work for experience), between 30 to 40 work for money and expertise comes itself. After 40″ I cannot tell as I still do not reach that age”.

In addition to:

Be active in the community and think about involving in the community. If you like, do blogging. Share what you know with others. 

Be very careful about your reputation. People first, Project second and company third.

What are a few things you do to be efficient in working?

Teamwork & machine work (automation), by merging both in one environment means you have the black magic.

What is the best way to keep up with technological advancements and changes?

It is tough to be aware of everything, so my recommendation is to keep an eye on Microsoft roadmap and events.

Any recommendation or guideline if a D365 CE professional wants to work in KSA?

 Understanding the mindset/culture of middle eastern people is the keyword to work in KSA. Be patient when dealing with the client as they keep changing the requirements, this still is the most challenge part for me. People are amiable in KSA, so be friendly to them as well. Same time don’t let anyone interfere in your personal life. Set the expectations, borders, requirements and rules from day one. Here the culture of private consultant, contractor, or part-time working is not fully embraced yet. Be cautious when accepting a job, focus on full-time jobs only.

Thank you Rasheed.

Accessing Git Repository from Visual Studio behind a Proxy Server

I was working for a client who has a proxy server on the network and every HTTP request passes through it. In this situation I couldn’t access my Git repository and was getting errors like

“Couldn’t resolve host..”

or

“Unable to access …”

For me the solution was to config proxy settings in GIT. On my local machine in command prompt I used this sample command:

git-config –global http.porxy Http://UserId:UserPassword@ProxyServerName.com:Port

For me port was 80 and I replaced UserId,UserPassword and ProxyServerName.com with my LAN id, password and proxy server name.

Once done it keep working until LAN password expires or changes. I hope it is helpful.

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Jim Novak

Power Chat with Jim Novak

Jim Novak is a Microsoft Business Applications MVP and a D365 technical architect. He leads D365 Saturday and TDG communities in Washington D.C. area. He is an admirable and inspiring community contributor. He frequently arranges events, presents as a speaker and develops tools for the community. I hope you will like this chat with Jim Novak 🙂

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

Set expectations for both the team and the customer – and reassess these throughout the project

Channels of communication – everyone has a say, so speak up!

Key stakeholders on the project who have the authority to make decisions

What delivery methodology you have found useful in projects?

Agile has worked best when it’s actually being followed.  Waterfall usually cannot keep up with faster paced projects

The methodology needs to be established early in the project and the entire team needs to be disciplined in following it, or adjusting when something is not working 

A hybrid of Agile and Waterfall rarely succeeds in my experience

What is one thing that can make a project successful or vice versa?

Lack of communication and setting expectations can destroy a project.  If each group is expecting a different outcome, then someone is going to be upset.

Preparation – when the project starts, being unprepared can cause huge roadblocks. For example, working on a D365 project and the customer has not yet procured licenses and an environment for development and testing

Give me two (or more) tips that will enhance the performance of my applications?

Avoid performing Creates/Updates using LINQ objects

For large queries, avoid LINQ

Reduce round trips wherever possible

Use the Pre stages in plugins to update the Target vs the Post to perform another update

Tell us two things (or more) which will improve the quality of deliveries?

Communication – all around… within your team and to the customer

Trust your team – if someone speaks up, listen.  Even if you disagree, it goes a long way in building trust

In the context of D365 CE implementation, what does architecture means to you?

Big picture – all the moving parts.  How to configure D365, security, entity model design, integrations, etc. 

Architecture to me means establishing an approach for the above early in the project, implementing, and adjusting as challenges arise.

What few things you consider when you are architecting or designing a solution?

Environment – Government Cloud vs Commercial

Integrations – any integrations required with external systems?

New solution vs move of an existing – can we leverage existing knowledge, technology, or business approaches to the new solution

Tell us anything that you consider is/are the best practice(s) and everyone should follow?

Standards for your team, devs and business analysts, that everyone will follow.  For example, naming conventions on entities, attributes, etc. That can make a big difference when developers write code against the entities.

Another example – documentation… being disciplined in documenting your work. Makes a big difference down the line when you wonder why someone did something!

Share a tip of yours to boost productivity as a dev, consultant or architect?

DevOps – a solid dev ops process can reduce time to deploy, keep the team in sync, and identify issues early. Even for a single dev, this can be a big timesaver

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

I have not had the chance to work with any AI

How you analyse and build security in projects? Any tips?

Start early – work on security as you are working out the data model and not as an afterthought

One approach is to start with a restrictive approach from the start.  Assume data is going to be locked down and grant access as required.  And the opposite – assume open and lock down selectively. Each approach means a good understanding of the requirements early in the project

Look at the “day in the life” of an end user. That may offer some insight into how to lock down security if needed.  How will User Group A access data vs User Group B?

How will the end users be accessing this data?  From the UI only, via Reports, or through external integrations?  Answering these questions early will help in applying security

Leverage Team ownership where possible as it often removes a single point of failure when working

While doing configurations do you follow some rules or practices?

Naming on entities, attributes, etc

Naming of form Tabs and Sections. This makes a big difference in Portal work for metadata as records

Documenting in the metadata – makes generating documentation easier

Managed or Unmanaged?

In recent years, I have come around to Managed.  It adds stability to downstream deployments

Early bound or late bound?

Early bound where possible

LINQ, FetchXML or QueryExpression?

LINQ for simple, low row count queries, but not for updates

FetchXml seems to be the fastest

Realtime vs batch?

Batch where possible.  Ex., ExecuteMultiple isn’t supported within a plugin and can cause SQL locks (I speak from frustrating experience there)

No code/ low code or hardcore development?

Yes – low code/no code until you hit the limit

LC/NC puts a LOT of power in to the hands of non developers who typically have a better understanding of the customer requirements

Once you hit the limits of LC/NC, the developer will have a narrower focus rather than building everything

In your kingdom, what sort of testing is mandatory (add more value) and which are optional?

Unit testing can be a lifesaver on a project – reduces errors on releases, can identify bottlenecks, etc.

Unit testing for devs also offers a common framework for building solutions. It can be used to communicate methods / patterns for development. Can also serve as a tool for ramping up devs.  New to the code?  Check out the unit tests for a bit of an idea how things work.

Generally for Integration, which technology and pattern is your choice?

Totally depends on the type of integration.  But recent projects, Azure Function Apps have been super helpful

Any open-source, community development, toolbox plugin that you want someone to develop?

Where do I start!?

Actually, I have a list of plugins that I am working on… I like to build them myself

And I rely on several XrmToolBox tools on a daily basis!

If you have all the resources to improve one thing in D365 what that would be?

Developer tools – loads of capabilities with the SDK but the toolset is fragmented

Deployments – deploying solutions is incredibly powerful, but moving data is a pain

What is one thing in model apps you consider people are not utilizing its full potential?

PCF controls – fairly new so I expect this to change!

If you are selling D365 just by one feature, what that feature is?

Data modelling – in just a few minutes, a non developer can build out a fully functioning and performant enterprise database

Or… security – the security model on the entities is very powerful

What will you suggest to someone who wants to be a D365 professional?

Grab a trial and build something! 

Access to a trial environment is MUCH easier these days, especially for partners and the quality of the documentation in the last year has greatly improved

And I find building something is easier than reading vanilla how-to documents

Check out some of the solution accelerators for ideas

What advice will you give your younger self who is already working as a D365 professional?

Participate in the community!  I missed out on a lot over the years because I was either shy or did not make the time.

The community has a TON to offer for learning

and share with the community. You will be amazed at how much help you have to offer someone!

What are a few things you do to be efficient in working?

I struggle with this – one thing I am working on myself is focus.  There is so much going on in the industry, focus on what is in front of you vs trying to take it all in

What is the best way to keep up with technological advancements and changes?

Follow the community sites – lots is posted about the platform by Microsoft themselves

Follow some community “leaders” – lots of community members have built expertise or have unique access to information.  Find some key people you trust to follow for updates

Thanks Jim.

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Rami Mounla

Rami Mounla is a solution architect based in Wellington, New Zealand. He is the author of Microsoft Dynamics 365 Extensions Cookbook. Rami is a regular speaker and organises different community events, including D365 Saturday, in New Zealand. He was awarded Microsoft MVP multiple years. It was a pleasure for me to meet Rami in Melbourne a few years back. I admire his experience, knowledge and community contributions. Here I m sharing his replies to my questions, I hope you will like it 🙂

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

Just like any other project, during kick-off, I tend to build a strong bond between the different parties by breaking the ice. I also find it very useful to ensure everyone is on the same page regarding scope. Also important to tackle early in Dynamics project is environment provisioning.

What delivery methodology you have found useful in projects?

Wagile is what works most of the time. A combination of waterfall and agile with different streams running in parallel.

What is one thing that can make a project successful or vice versa?

An experienced team that have respect among each other. 

Give me two (or more) tips that will enhance the performance of my applications?  

Less is more and indexing.

Tell us two things (or more) which will improve the quality of deliveries?

Embed peer reviews as a part of your definition of done, design principles & standards, and static analysis.

In the context of D365 CE implementation, what does architecture means to you?

Defining the building blocks that constitute your solution and how they interact with each other.

What few things you consider when you are architecting or designing a solution?

The customer’s landscape and architecture principles, the staff implementing the solution and their capabilities, and the NFRs.

Tell us anything that you consider is/are the best practice(s) and everyone should follow?

Keep it simple.

Share a tip of yours to boost productivity as a dev, consultant or architect?

Team motivation and respect.

Tell us about a canvas app that you have built or seen which was awesome?

Offline power app for remote farmers.

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

A well training chatbot that reduced a customer’s call centre load by 60%

 How you analyse and build security in projects? Any tips?

First question is to identify where on the spectrum they are. Open by default (use security roles) Close by default (use access teams) or anywhere in the middle. Then spend the rest of the time understanding the different use cases. Always consider performance implications when building security models. 

While doing configurations, do you follow some rules or practices?

Following standards is always a good idea. I do discuss best practices in my book Microsoft Dynamics 365 Extensions Cookbook.

Managed or Unmanaged?

Managed

Early bound or late bound?

Depends, early bound for well defined, late bound for flexibility

LINQ, FetchXML or QueryExpression?

Depends, LINQ for .NET and FetchXML for JavaScript

Realtime vs batch?

Depends, on the use case. Both are valid.

No code/ low code or hardcore development?

Depends, low code when I can, development when it’s easier or for integration…

In your kingdom, what sort of testing is mandatory (add more value) and which are optional?

Full test suite for high risk areas, the rest is dependent on the team’s confidence.

Generally, for Integration which technology and pattern is your choice?

Depends on the solution and the customer’s landscape and constraints. Typically, it is Azure Service Bus with Azure functions.

Any open-source, community development, toolbox plugin that you want someone to develop?

If there is, I will build it.

If you have all the resources to improve one thing in D365 what that would be?

Consistency across the platform to replace the old with the new.

What is one thing in model apps you consider people are not utilising its full potential?

It’s extensibility.

If you are selling D365 just by one feature, what that feature is?

It’s flexibility.

What will you suggest to someone who wants to be a D365 professional?

Consider the Power Platform.

What advice will you give your younger self who is already working as a D365 professional?

Keep calm and carry on.

What are a few things you do to be efficient while working?

Prioritise my work and delegate.

What is the best way to keep up with technological advancements and changes?

Try it out, read, check what others are trying.

Thanks Rami.

Let’s Connect

 twIcon lnIcon fbicon

Create Rich Chatbots With PVA

Have you tried Power Virtual Agent (PVA)? If not I will strongly recommend to try it now from https://aka.ms/TryPVA.

If you have already tried a basic functional bot, probably it is time to explore a few features further and think about creating a better chat experience. This post discusses a few ways we can try to format and present bot responses in a comparatively rich format.

Let Your Bot Smile

You will not see a button to add smiles in bot replies. But since basically emojis are HTML characters, if we copy a smile HTML code and past in bot response, it will appear as expected in chat 🙂

Hyperlink, Bold and Italic

Probably you have noticed from the above image we can create hyperlinks in chat. Not only hyperlink but other formatting options like bold, italic, bulleted and number lists are also available. These options appear under ‘Show a message’.

Images

As per planned features by mid of this year ability to add images and videos will be available in PVA. Still, until then you can use HTML symbols in chat using same technique as explained in smiles section. Explore the list of around a thousand HTML symbols here.

Create Bot in Other Languages

One of new features coming this year is support of additional languages. Actually, before knowing it I tried creating a bot in “Urdu” language, and it was good to see first Urdu bot:

I hope you will like PVA, please comments and let me know how you are finding it. Have a great day.

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Stefano Tempesta

Stefano Tempesta  is based in Melbourne, Australia. He is a CTO, digital advisor, Speaker, Author, and Blockchain & AI expert. Stefano is Microsoft Regional Director and MVP in three categories (AI, Azure and Business Applications). He is one of founder members of D365 Saturday

This week in “Power Chat” I asked my questions to Stefano, I was particularly looking for him because he has versatile rich experience which is not just around D365 and Power Platform. Here are my questions and Stefano’s answers, hope you will like it 🙂

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

Always focus on the value that your project is bringing. There is no one size fits all in business applications, but rather a combination of factors, ideas, approaches that make the final solution. This can be in Dynamics 365 or it may not be, so always keep an open mind on what can be done and how, and consider all options before choosing the one that brings more value to your customer.

What delivery methodology you have found useful in projects?

Definitely agile. Many people talk about doing agile but still many fail because they see agile as a way to cut time or cost. Agile is none of this, agile is about continuous delivery and improvement. It’s not about taking shortcuts but it’s about delivering incremental value.

What is one thing that can make a project successful or vice versa?

People make projects successful, nothing else does. So choose the right team for your project. But also, choose the right projects and customers. You can’t deliver any type of projects, as well as not all customers have a problem that you can resolve. Pick the ones that you are confident you can deliver successfully. 

Give me two (or more) tips that will enhance the performance of my applications?

Clean up your data always before using it inside your application. This is even more relevant to a system like Dynamics 365, which is based on entities and relationships stored in a relational database. Then, use the right tool for the right problem. There are multiple ways to obtains a result, don’t assume that what worked in a case or for someone else would work again in another project.

Tell us two things (or more) which will improve the quality of deliveries?

Be clear on what you are delivering, write down any assumption you make and a list of open questions. Don’t improvise if you don’t know, do your own research or ask for help. Design the big picture and focus on the details. In this way you deliver a solid product and also have a view on the business value that it brings to your customers.

In the context of D365 CE implementation, what does architecture means to you?

Architecture means a lot of things, so I’ll focus on a “solution architecture” in the context of Dynamics 365. This is about having a clear picture of how the final solution looks like: what are the modules enabled, who can and how to access them, what’s the data model like, data input and output flows, system integration, strategy for business continuity and other non-functional requirements like accessibility, mobility and internationalization.

What few things you consider when you are architecting or designing a solution?

Who is going to use this system? What are they trying to achieve with it? How is my solution going to bring more value to my customer? In which way am I improving their business? Will the system be secure, scalable and available as necessary?

Tell us anything that you consider is/are the best practice(s) and everyone should follow?

A common “best practice” that I follow, if I can call it that way, is not to reinvent the wheel every time. I mean, software solutions have been developed for years, I’m pretty sure someone has already found a solution for that requirement that you are trying to address. Look out first, before bogging your head down into custom development. And the second best practice that I follow is to not over engineer a solution. It’s very likely you are not building the next Space Shuttle to go to the Moon using Dynamics 365 or the Power Platform 🙂 – unless you are! – so keep it simple, deliver to requirements, and design for incremental value, not absolute design. Practically, just to give an example, this means that you don’t really need to capture all possible nuances and differences of your entities upfront before starting with the implementation of your solution. Keep your data model fluid and allow it to grow and evolve. Systems that are not designed to evolve, will extinguish soon. You can call this approach the “dinosaur guideline” 🙂

Share a tip of yours to boost productivity as a dev, consultant or architect?

Stay focussed. Jugglers are for the circus. Unless you work in sales, which is what I said (re the circus). People are not meant to work on multiple tasks at the same time, the context switch is too expensive in terms of brain power. Stay on the topic and deliver it without distractions. Then, move to the next one.

Tell us about a canvas app that you have built or seen which was awesome?

All my apps are awesome 🙂 Rather than pointing you to an app in particular, I’ll tell you my criteria for building an awesome app. It has to do with the same principles that I follow in building software applications, I design services that are intuitive to use, get the job done and do one thing only but do it very well. No frills apps are the best apps. Simple and quick to use.

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

“Virtual Eye” is a project that uses AI technology such as vision and speech cognitive services to help the visually impaired to understand the environment around them and make them able to recognize people and objects. For example, an application of this technology is for business meetings, where hard-sighted people will wear smart glasses that can recognise people around the table and describe them verbally.

How you analyse and build security in projects? Any tips?

I follow the Microsoft SDL (Security Development Lifecyle) framework, a collection of tools and best practices for software architects and developers to build highly secure solutions and address security compliance requirements.

While doing configurations do you follow some rules or practices?

You know, I don’t really do many configurations. If I had to, I’d follow the recommendation of the experts. As a rule of thumb, I’d say to be consistent, especially around terminology: names of entities, fields, forms, etc. I don’t like mess 🙂

Managed or Unmanaged?

It depends 🙂

Early bound or late bound?

It depends 🙂

LINQ, FetchXML or QueryExpression?

It depends 🙂

No code/ low code or hardcore development?

Low code. No code is for basic apps, hardcode is for big troubles. Wisdom is in the middle.

Realtime vs batch?

Realtime whenever possible. There are tools and technologies to make it happen now, 24-hour stale data is so old-fashioned. Platforms like Azure Event Grid can scale easily and deliver (near) real-time data sync.

In your kingdom, what sort of testing is mandatory (add more value) and which are optional?

All testing is optional… until you have a problem. So you’d better test your solution beforehand to avoid getting into troubles. The only testing that counts, at the end, is UAT. Your unit tests, system tests, integration tests, performance tests etc can all pass, but if your solution doesn’t pass the final user acceptance, it’s not a solution yet.

Generally for Integration which technology and pattern is your choice?

API-based endpoints and asynchronous services, all in communication among them via a service bus and an API management platform. This pattern of integration scales and is secure.

Any open-source, community development, toolbox plugin that you want someone to develop in the future?

I would love to see an open source tool for event management using the capabilities of Power Platform, for calls for content, agendas, registrations, etc. And community events around the world contributing to its development and adoption by running their own events on it. Hey, but maybe I can start developing it! 😉

If you have all the resources to improve one thing in D365 what that would be?

I don’t need all the resources; I need the right resources necessary to improve its overall performance and scalability. Competitive platforms are slicker and more usable, respond better to increasing load and, overall, give a feeling of being more robust. This is still lacking in some components of Dynamics 365.

What is one thing in model apps you consider people are not utilizing its full potential?

Model-driven apps have been part of Dynamics 365 for long, even before Power Apps, although they were not technically called that way. I believe organisations are using apps to their best; however, I still see some areas of improvement around security. For example, it is possible to configure specific security roles to use within an app to grant or restrict access to specific capabilities. This is often overlooked and default permissions are assigned to any app user.

If you are selling D365 just by one feature, what that feature is?

Its ecosystem of products and integrated cloud services is the richest in the market. Dynamics 365 is not only about its core capability for CRM and ERP, but it’s also about the strong integration with other Azure services, such as data analytics, AI, IoT and even blockchain.

What will you suggest to someone who wants to be a D365 professional?

Pick an area of specialisation within the Dynamics family, it’s too big to know everything. Become the best in that area, get certified and then share your know-how with the community, especially at 365 Saturday events!

What advice will you give your younger self who is already working as a D365 professional?

See the previous answer! That is what I would tell myself. Instead, my younger me was too keen on learning everything, so I did not invest enough time on certifications or community. I actually got my first certification only in 2013, and my first public speaking in 2014, way too late since I started my professional career.

What are a few things you do to be efficient in working?

“Mens sana in corpore sano” said the ancient Romans. Your mind is sound if your body is healthy. Find your balance in life, stay focussed and healthy, and enjoy what you do. If you don’t like it, or if it stresses you out, why are you doing it?

What is the best way to keep up with technological advancements and changes?

Attend 365 Saturday events. For more information, go to 365portal.org 🙂

Thanks Stefano.

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Neil Parkhurst

Neil Parkhurst  is based in Dudley, United Kingdom. He is a consultant, trainer, project manager & Microsoft MVP (Business Applications)

If you have any interest in D365 CE, USD and even relevant certification exams chances are, in one way or other, you have been benefiting from Neil’s community work. He is an absolute legend, it was a pleasure for me to attend Neil’s session (about Omnichannel) last year and later meet him at a community event in Melbourne. Here are my questions and Neil’s replies.

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

 With large projects there will often be a formal kick off meeting but with small customers / projects this step can get missed. If you have a formal kick off or not it is important to get to know the people involved. Projects pretty much always involve some challenging points so getting to know everyone involved and building strong relationships with them is important. Go out for a meal, have a coffee, whatever …. But get to know the people involved on a personal level.

 Another important step is to meet with some real end users of the current system and understand their pain points. You need to feel their pain to be able to create a solution that will ease it!

 What delivery methodology you have found useful in projects?

 Which methodology works best varies so much with each client …. The time they have available, the clarity of their vision and existing processes can all influence which methodology works best. I do favour an Agile (ish) approach simply as I find working in small iterations (sprints) to be more logical. But often you need to be guided by the customer, if they are already running successful projects it can make sense to simply adopt their existing approach.

 What is one thing that can make a project successful or vice versa?

 People. A slightly glib answer but people make projects successful. Having a skilled and motivated team that works well together is absolutely the most important thing. I believe if you get the people right all other problems will be solvable.

Give me two (or more) tips that will enhance the performance of my applications?  

 Include performance as a requirement and think about how it can be measured up front. So often performance is considered an implied requirement that nobody considers until late in the project.

 If you do this, you’ll be forced into thinking about not only how to make the system performed as needed but also how can you demonstrate this during testing.

 Tell us two things (or more) which will improve the quality of deliveries?

 Involve testers early. How many projects do we work on that the testers don’t get involved until late in the build phase. Involving testers in requirements gathering helps ensure they are fully aware of what to expect and also helps give quality a focus right from the start of a project.

 Tell us about a canvas app that you have built or seen which was awesome?

I wouldn’t say they are awesome but I have written a few canvas apps now. Not being awesome might (to some extent) be the point, they are simple apps that just get a job done. Generally these have integrated in with Dynamics 365 model driven apps or Unified Service Desk. For example, a canvas app that gives reminders to my contact centre agents when call backs are due.

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

I do like the preconfigured sentiment analysis in the webchat of Omnichannel for Customer Service. I also love how easy creating applications that use AI is starting to become. For example, creating a Power Virtual Agent that has linguist skills is child’s play. But just a few years ago creating an “intelligent” BOT would have been a hardcore developer job.

Managed or Unmanaged?

Both!! 

 No code/ low code or hardcore development?

No code first, low code second. Only dev stuff if you have no other option. Keep the system as simple as possible and use as little code as you can. It will make future upgrades so much easier.

For example, a customer of mine has a very “good” bespoke system for recording time against cases and a custom case resolution process. The custom controls look great and have been well written. But now they are moving to the Unified Interface this custom approach is failing. When I got them to revisit the original business drivers for having the customizations it became apparent that a simpler (out of the box) solution always would have worked. Which would have saved them the original development costs and now would allow a hassle free upgrade.

 If you are selling D365 just by one feature, what that feature is?

Sorry this doesn’t really make sense to me! You could pretty much develop any single feature in Dynamics yourself for less cost …. I would suggest the point is that you get a massive number of features that just work without needing to develop anything.

If I was to “sell” just one feature it would always be the next new feature. Which again is the point as Microsoft are constantly giving us new “toys” to play with!

What will you suggest to someone who wants to be a D365 professional?

Do it …. It is a great career! Focus on getting some certifications and also then some good experience. Working for a Microsoft Partner can help as you’’ll be exposed to multiple projects and technologies very quickly!

What advice will you give your younger self who is already working as a D365 professional?

I’m over 50 now! Yet I’m enjoying my working life more than ever that hasn’t happened by accident. Working as a D365 professional (or in any career) needs to be something you REALLY love. If you aren’t enjoying what you do …. change it! I took a number of bad career decisions when I was younger. I worked very hard to move up the corporate ladder without once stopping to think if these “upward” moves were making me happy. So my advice to the younger me would be to not chase status and instead to focus on enjoyment. The former may lead to more money but the latter leads to a happier life. Which do you want?

What are a few things you do to be efficient in working?

Sleep, listen to music and fish! When I am at work I am very focused and work really hard. But relaxing is massively important to give you the energy you need. So get plenty of sleep and take time out to relax. For me that means listening to music or fishing. (Other pass times are available!!)

What is the best way to keep up with technological advancements and changes? 

I wish I could easily answer this. In my career I have seen the pace of change get faster and faster. Therefore it has become a bigger and bigger challenge to keep your skills current. The truth is pretty much nobody can stay totally current with everything. This means picking topics that interest you and investing time into those. For me, keeping my certifications current, blogging and being active in the Dynamics community all help me.

Thanks Neil.

Let’s Connect

 twIcon lnIcon fbicon

Power Chat with Andre Margono

Andre Margono  is based in Melbourne, Australia; he is a System Architect & Microsoft MVP (Business Applications)

In Power Chat I m interviewing Power App experts and share their practices and suggestions with community. These ideas can lead a project to success. Here are questions I asked Andre and his replies.

For the success of a Power App or D365 CE project, what are a few things (practices or steps) you do when kick-starting a new project?

  • Know the scope very well, what we are trying to achieve and what the client actually needs
  • Identify the risks upfront and prepare the mitigation plans
  • Identify and work closely with the SMEs
  • Have the right team with the right attitude

What delivery methodology you have found useful in projects?

It depends. I’ve worked in projects that used Waterfall, Agile and anything in between. Depending on the work style of the project team and the client that we are working with

What is one thing that can make a project successful or vice versa?

Teamwork and collective knowledge of the team

Give me two (or more) tips that will enhance the performance of my applications?  

  • Do load testing
  • Do peer review

Tell us two things (or more) which will improve the quality of deliveries?

  • Peer review
  • Good QA team

In the context of D365 implementation, what does architecture means to you?

Understanding the business & technology needs, from there design the solution that is cost effective, scalable, extensible and robust. Plus setting up design principle of the solution.

What few things you consider when you are architecting or designing a solution?

  • Current landscape of applications within the ecosystem
  • Understanding the volume of the transaction/process
  • What is the company’s roadmap (e.g. understanding their strategic IT direction)
  • What system(s) that we need to integrate with and how to connect with them
  • Understanding the data model

Tell us anything that you consider is/are the best practice(s) and everyone should follow?

  • IMHO, there is no straight right/wrong for a solution/design
  • Listen to the detail and ask the right questions.
  • Put ourselves in the shoes of the end users.
  • Always think on scalability, often I found some design is designed for a very specific issue/requirement, but not considering the bigger picture of the purpose of the functionality.

Share a tip of yours to boost productivity as a dev, consultant or architect?

  • Focus on the tasks that you need to do
  • Always learning

Tell us about a canvas app that you have built or seen which was awesome?

  • I’ve built some simple canvas apps, one of them is to capture “lead” and run some promotion during my past company’s work
  • The cool apps are made by Hiro Nagao (Japan Power Apps MVP). He uses maths in producing cool apps with just formulas

Have you seen an impressive AI application recently, preconfigured or custom which you want to mention?

If it is related to solutioning, I would give a kind of “rough” boundary, depending on the needs.  If you are happy with the standard purpose-built and templated AI functionality that gives no or basic functionality: use OOTB AI features like Sales Insight, etc If you would start embracing the AI-based solution to solve specific business problem based on a predefined algorithm/AI model: use AI Builder if you have data science team that understand how to model AI: use Azure ML.

So far, I haven’t seen any solution that matures enough to go beyond the basics. Apart from the usage of chatbots, basic AI prediction, sales insight, I haven’t seen anything super sophisticated (keen to see one though)

How you analyse and build security in projects ? Any tips ?

Analyse: use tools like XrmToolBox or use paid tool like SnapShot! Build: usually I gave an excel template for the business to fill in after I gave them the explanation on the level of access (user, child bu, parent child bu, organisation), usually BU conforms with the org structure and prepare the roles based on the team structure. if it is a different kind of security (e.g software security for integrations), usually we have auditors & specialist team that are doing penetration testing.

While doing configurations do you follow some rules or practices?

Nothing in particular, just using common senses. eg: use the right publisher, give a meaningful name to the field/view/dashboard/rule, I usually name workflow/actions with a number prefix, for easy documentation and search (e.g: for an action: “a001/actionname”). Also probably segregate the solutions based on the process (usually driven by the ALM strategy).

Managed or Unmanaged?

Depends… This is a never ending debate. I was coming from an ISV background, so I accustomed with Managed solution and all its intricacies to work with. Working in consulting, depending on client’s maturity and discipline in maintaining things in source control, managed solution could be overkill for them. My only hope is in the near future with the whole investment in ALM for PowerApps, the pain points of Managed solution can be addressed (looking at solution dependency-hell) and the tooling to support non-technical/developer to set the ALM process (this is the biggest drawback when we are implementing a simple solution that doesn’t need to write any codes. And the team that work on it doesn’t have developer within).

Early bound or late bound?

Each to its own game. Early bound is good for compile type safety (I usually use this). Late bound is better for performance (only load the necessary attributes).

LINQ, FetchXML or QueryExpression?

FetchXML for performance.

No code/ low code or hardcore development?

Each have its own niche. Depending on the requirements, go with the right tool.

In your kingdom, what sort of testing is mandatory (add more value) and which are optional?

Mandatories:

  • Basic unit testing
  • Integration testing
  • Regression testing
  • (Grey area) load testing

Optional:

  •       Penetration testing

Generally for Integration which technology and pattern is your choice?

  • IF API-based option is available, I’ll choose API-based approach (can be vary depending on the existing technology landscape)
  • IF not available and only database level access, I’ll use SSIS/ADF.


Realtime vs batch

That question is when you are doing requirement gathering. Typical questions to interrogate: does it need to be processed right when it is requested? If not, what is the turn around time for the request to be processed? How big is the volume?

Any open-source, community development, toolbox plugin that you want someone to develop?

More PCF controls!

If you have all the resources to improve one thing in D365 what that would be?

Performance

What is one thing in model apps you consider people are not utilizing its full potential?

Alternative Key.. very rare that I see solutions with integration is using this. This feature is really good in maintaining the ID/key integrity

If you are selling D365 just by one feature, what that feature is?

The ease of creating data model & form -> which is now sold as Power Apps Model Driven/CDS for apps.

What will you suggest to someone who wants to be a D365 professional?

  • Learn from others
  • Network in local UG
  • Do hands-on, spin up trial. Now you can sign up for Power Apps dev edition as well

What advice will you give your younger self who is already working as a D365 professional?

  • More focus on less things, than trying to learn too much

What are a few things you do to be efficient in working?

  • Keep reminder for myself on what I need to do, and do it straight away, don’t wait.

What is the best way to keep up with technological advancements and changes?

  • Subscribe to the right channels (twitter, linkedin, etc)
  • Read the right articles
  • Keep hands-on with some technologies that you want to focus

Thanks Andre.

Let’s Connect

 twIcon lnIcon fbicon