Showing posts with label #msdyn365. Show all posts
Showing posts with label #msdyn365. Show all posts

July 22, 2020

Microsoft renames things... again

If you read one of the recent announcements (like this one Introducing Microsoft Dataflex, a new low-code data platform for Microsoft Teams) you know that CDS (Common Data Service) has been renamed to Microsoft Dataflex Pro (and a subset version for Microsoft Teams is called Microsoft Dataflex).

It's not the first time that Microsoft renames some products/services (if we keep the examples inside the Dynamics space, they just renamed Forms Pro to Customer Voice) so I am not surprised of this change, probably if I write "two years later they will change it again" I may be right.

However the main question is "why they changed the name?". Let's be honest, Microsoft Teams in the recent months gained more and more traction, becoming a popular product inside the ecosystem, I don't have exact numbers but if you probably ask around about Microsoft products, I am quite sure Teams is more known than the Power Platform or one of its services (maybe with the exclusion of Power BI, people love reporting). 

When Microsoft decided to introduce a subset of Dynamics CRM CDS to Teams it's right to show these new functionalities to the audience and probably the CDS name wasn't a good fit. CDS carried always a bit of confusion (CDS, CDM, CDS-A, ...) and when CDS appeared practically the only product using it was Dynamics 365, a true separation of the platform (that in my opinion is still in progress but just for minor things) arrived years later. It's easy now to say Dataflex Pro = CDS, wasn't the same with the previous names.

I may or may not agree with the new name or part of it (for example leaving Pro as CDS, or the fact that is Dataflex and not DataFlex or Data Flex) but I really hope Microsoft pushes these products (with a new one just for Teams) in the right way and not only keeping these name changes as a generic announcement.

This post is not a list of the differences between the two versions (Dataflex vs Dataflex Pro) because I am sure that when I discover "functionality X" is available only on CDS Dataflex Pro I will be a bit disappointed, but in the same way I will be very happy when "functionality Y" is available in Dataflex.

They may be based on the same technology, but they are two different products with different targets in mind, we should not forget that. I usually don't talk about licensing, mostly because it's not part of what I do everyday, but if after a product pitch the first question is "how much does it cost?" probably the pitch wasn't that good, if you are proposing Dataflex/Dataflex Pro to improve the capabilities of a process and people don't start to ask "so means that I can do this right?" or "do you think it's possible to do X?" and they focus on just the cost then maybe it's not a good fit, we should not change a product for another, we should focus on doing things better. Said that, licensing is too complex and too aleatory (and for some things too pricey, I am looking at you Power Apps Portals) so my hope is also to have a clear picture of the costs involved if I decide to use the Power Platform or just a part of it.

Welcome Dataflex/Dataflex Pro! You may increase functionalities or change name, but for me you will always be the same when I write Entity newAccount = new Entity("account");, in the end I am a bit sentimental when I write some code.



February 29, 2020

Exam MB-400: My Experience

This morning I finally got the result from an exam I did a while ago: the MB-400: Microsoft Power Apps + Dynamics 365 Developer.
I passed it (result here) but I learned two important lessons:
  • I will never do again a Beta exam
  • I need to prepare better the exams
The reasons I took this exam in Beta were essentially two: I got an early discount code (here a mention of it for the first 300 people) and it was the first technical exam about Dynamics 365 released in a long time.

The previous technical exam was MB2-701 Extending Microsoft Dynamics CRM 2013 (that I passed too by the way) and I was eager to prove myself that I still got it. My main skills regarding Dynamics 365 and the Power Platform are technical, so I felt that I needed to do this exam, as additional proof I didn't do yet the MB-200: Microsoft Power Platform + Dynamics 365 Core that is considered by many one of the exams that you need to take if you want to start this path.

If you use the discount code you have also a time limit (in my case was 12 December 2019) but due to previous commitments I scheduled the exam for 14 November, only two weeks after the announcement.
In that two weeks I tried to prepare the exam the best as I could, but remember to follow the official exam skills in addition to the suggested learning path because (for example) the Learning path suggests Extend Dynamics 365 portals but Portals is not an argument included in the exam skills, and the exam skills contain PCF (Power Apps Component Framework) and a learning path is not available yet.

When I booked the exam I thought: "if I don't pass the exam it's the same, I can do it again" but after I did the exam I instantly regret the decision, because the exam was hard for the preparation I had and you don't get the result right away when you do a Beta exam. Waiting for over 3 months and be in a limbo where you don't know if you passed or not an exam is something I don't want to experience again.

So my suggestion is to always go prepared for the exams, and if you plan to take the MB-400 I suggest also to read the posts by Joe Griffin in his website.

December 5, 2019

Unified Interface transition: Powered by Power Apps Portals

The latest news is that Microsoft is scheduling the transition to Unified Interface way before October 2020. If you are interested in this topic check this blog post by Magnetism: Scheduling Dynamics 365 Unified Interface Upgrade in the Transition Portal and this twitter thread by Jukka Niiranen.

After I heard the news I quickly checked one of the tenants I have access and with my surprise (beside the early date Microsoft scheduled) I noticed that the site https://runone.powerappsportals.com is built with Power Apps Portal.

Yes, the domain was an obvious clue, but as soon I saw the Profile Page I recognized it:


I work with Power Apps Portals (since it was called ADX Studio Portals) and I am happy to see Microsoft using it also for this kind of websites. If you believe in a product you should be the first to use it, right?

If you want to know more about Power Apps Portals, you can check the official site: https://powerapps.microsoft.com/en-us/portals/ and the blogs of three MVPs: Nick Doelman, Colin Vermander and Nicholas Hayduk.

What are you waiting for? Go to check the scheduled dates for your instances!

July 19, 2019

New SDK released with support for new regions (France, US Gov DoD, China)

A week ago thanks to a question on Dynamics Community Forums (link) and to Daniel Cai that spotted the crm12 inside the url, I became aware that a new region for Dynamics 365/PowerApps (located in France) was introduced, however the SDK was not able to connect to this new region as it was not updated yet.

Yesterday the SDK Team released an update to several NuGet packages (link), from the changelog:
Added support for France and New US Geo's

Microsoft didn't update yet the official documentation page but you can check in the next days if you need the exact Discovery Url (especially for the new US region, for the France one you just need to use crm12)

Meanwhile I was testing the new Plugin Registration Tool, I noticed they also introduced a new region in China, strangely the changelog didn't mention this.

Hope it helps!

March 28, 2019

Update user’s calendar in Field Service schedule board

Configuring the work hours for a user is straightforward from the Dynamics 365 UI, a couple of clicks and you are done. However in the last years we saw an increase of Field Service projects, hence the necessity to automatize the creation and the update of user's works hours.
C# code to update the calendar entity has been around from CRM 2011, like this one:
Sample code to update user’s calendar programmatically (work hours) in CRM 2011

The code linked above works perfectly when you see the work hours inside the user calendar, however they don't appear inside the Field Service schedule board. How can we make sure the work hours appear everywhere?

Nearly 50 lines of code to create a work hour entry are (at least to me) a bit excessive, but this is the way Dynamics work. I tried to simplify the code by renaming the variables and adding the code necessary for the work hours to appear inside the schedule board.
// we start with the user Id
Guid userId = Guid.Empty; // instead of Guid.Empty here we should have the real user Id

// we retrieve the calendarid from the user entity
Entity user = service.Retrieve("systemuser", userId, new ColumnSet("calendarid"));
Guid userCalendarId = user.GetAttributeValue("calendarid").Id;

// we retrieve the calendar record in order to get the Business Unit and the Calendar Rules
Entity userCalendar = service.Retrieve("calendar", userCalendarId , new ColumnSet("businessunitid"));
Guid calendarBusinessUnitRef = userCalendar.GetAttributeValue("businessunitid");
EntityCollection calendarRules = userCalendar.GetAttributeValue("calendarrules");

// we create a new calendar record (inner)
Entity innerCalendar = new Entity("calendar");
innerCalendar["businessunitid"] = calendarBusinessUnitRef;

// Field Service Schedule Board: we must define the type as Inner Calendar
// https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/types-calendars
innerCalendar["type"] = new OptionSetValue(-1);

Guid innerCalendarId = service.Create(innerCalendar);

// we create a calendar rule for the whole day we want to edit
Entity dayRule = new Entity("calendarrule");
dayRule["duration"] = 1440; // 24 hours in minutes
dayRule["effort"] = 1.0;
dayRule["extentcode"] = 1;
dayRule["pattern"] = "FREQ=DAILY;COUNT=1";
dayRule["rank"] = 0;
dayRule["timezonecode"] = 110; // 110 is (GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
// GetAllTimeZonesWithDisplayNameRequest can be used to retrieve all the timezones with their code
dayRule["starttime"] = new DateTime(2019, 3, 28, 0, 0, 0, DateTimeKind.Utc);
dayRule["innercalendarid"] = new EntityReference("calendar", innerCalendarId);

// Field Service Schedule Board: we must also define the calendarid reference to the user calendar
dayRule["calendarid"] = new EntityReference("calendar", userCalendarId);

// we attach it to the Calendar Rules of the user
calendarRules.Entities.Add(dayRule);

// we update the user calendar to refresh the calendar rules collection
Entity updateUserCalendar = new Entity("calendar", userCalendarId);
updateUserCalendar["calendarrules"] = calendarRules;
service.Update(updateUserCalendar);

// we define the calendar rule containing our work hour 
Entity exactCalendarRule = new Entity("calendarrule");
exactCalendarRule["duration"] = 120; // 2 hours in minutes
exactCalendarRule["effort"] = 1.0;
exactCalendarRule["issimple"] = true;
exactCalendarRule["offset"] = 480; // 8 hours in minutes from start time (12:00)
exactCalendarRule["rank"] = 0;
exactCalendarRule["subcode"] = 1;
exactCalendarRule["timecode"] = 0;
exactCalendarRule["timezonecode"] = 110; // same timezone as the day rule
exactCalendarRule["calendarid"] = new EntityReference("calendar", innerCalendarId);

// we add the calendar rule to a collection
EntityCollection innerCalendarRules = new EntityCollection();
innerCalendarRules.EntityName = "calendarrule";
innerCalendarRules.Entities.Add(exactCalendarRule);

// we update the inner calendar with the new calendar rules 
innerCalendar["calendarrules"] = innerCalendarRules;
innerCalendar["calendarid"] = innerCalendarId;
service.Update(innerCalendar);

In the end to changes were necessary to make the work hour visible inside the Field Service schedule board:
  1. We must define the type for the Inner Calendar
  2. We must reference the user calendar inside the calendar rule the the whole day
I didn't discover this by myself but with the help of Microsoft support, hope it helps.

January 14, 2019

getText API behavior changed

Some days ago I was upgrading some JavaScript files to v9 and I noticed one of the scripts was not working correctly.
The specific code was using the getText function in order to retrieve the label of an optionset field. The getText function used to return an empty string in Dynamics instances prior to CRM 2016, but in recent versions it returns null. If you need to handle the label in your code (like showing some alerts) the check should be like this one:
function checkOptionsetLabel(context, fieldName) {
    var selectedLabel = context.getAttribute(fieldName).getText();
    if (selectedLabel != null) {
        // ...
    }
}
Also the official documentation has been updated to highlight the return value. Hope it helps!

December 31, 2018

Dynamics Weekly and recap of (my) 2018

If you were hoping to read (after long time) a technical post from me, I am sorry but you need to wait a bit longer :)
In this post I will write about Dynamics Weekly (first part) and what I have been up to during 2018 (second part), let's start.

Dynamics Weekly is my newsletter regarding Dynamics 365 CE, I started it in the end of 2017 and it's going well.

A chart of the subscribers: (click to zoom)

This chart shows 2 things:
  1. There is a steady increase of the subscribers, that's nice
  2. I am terrible at promoting the newsletter, because except the initial grow (maybe due to my spamming on Twitter and LinkedIn) the final count is relatively low
I want to tell how Dynamics Weekly started. Back in December 2017 I realized that due to my commitments (both work and personal) I was not able to keep track of all the news, Dynamics is my work but I also like it and it's pity if I miss the cool stuff.
I already knew that the 2018 would have been the same, so I needed a way to force myself to check the Dynamics world. A weekly newsletter is a good way to summarize the content published during the last days, also having the email in my inbox allows me to search for specific posts that I vaguely remember just using few keywords.

Most of the time I am able to collect the newsletter material during the week, sometimes I do the Sunday evening before the send. But Keep Dynamics Weekly running is useful to me and to the subscribers, in the last year I received many messages of appreciation, thanks to all of you.
Of course Dynamics Weekly would not exist without all the contributors in the Dynamics communities, I am honored to know some of them and the time and energy they spend creating all kind of content is way more important than mine spent on preparing the newsletter.

And now the second (brief) part of this post. How was my 2018? to be honest not great, it really drained me of energy and the final reward was very small. But I met new friends, I learned new things (not related to Dynamics) and I am positive 2019 will be a better year.

PS: 19 January I will join the "Dynamics Power! 365 Saturday London" event, see you there.

Thanks!

August 11, 2018

Display a Two Options field as checkbox inside a Quick View Form

The other day I was working on a project involving a Quick View Form, nothing complicated but in the end it required some additional steps to achieve the desired result.
The purpose of this Quick View Form (for the Account entity) was to show a single Two Options field, so the users don't need to open the related account record to see the value of this boolean field.
As usual I created the Quick View Form, added the Two Options Field, save & publish, added the Quick View Form inside the other entity, save & publish. All was working except the Two Options Field was displaying as a label showing Yes or No:



As I need to show this field as a checkbox, first thing I thought was: "no big deal, I back to the form editor and I change the formatting to show a checkbox", the only problem is that the "Formatting" tab inside the field properties is missing when you work with a Quick View Form:



So it is not possible to set the Control Formatting style to display the field as a checkbox, as you can do inside a standard or a Quick Create Form:



A workaround is to manually edit the solution XML and change the classid attribute of the control to a specific value.

Beware: you should do this kind of editing only if you know what you are doing, I don't encourage to go and edit files without having a proper knowledge of the XML structure.

First step I did is to create a new solution containing just the Quick View Form I needed to edit, this is possible with the "Select Entity Assets" wizard of the latest versions of Dynamics, if you are on an older version you need to add the entire entity (with all the forms, views and fields) to the new solution.



After I exported the solution as Unmanaged, I extracted the zip file to a folder and I edited the file customizations.xml. In order to find the right place to edit I searched for the logical name of the field (in my case marketingonly) and I was in front of the definition:
<cell id="{32660749-eb65-6c8d-208c-664929db91db}" showlabel="true" locklevel="0">
  <labels>
    <label description="Marketing Only" languagecode="1033" />
  </labels>
  <control id="marketingonly" classid="{67FAC785-CD58-4F9F-ABB3-4B7DDC6ED5ED}" datafieldname="marketingonly" disabled="false" uniqueid="{b751c953-ac42-7723-a3c5-d4c7b0514c0b}" />
</cell>
As I mentioned before the attribute to update is classid, so I changed the guid value to {B0C6723A-8503-4FD7-BB28-C8A06AC933C2}, if someone is curious where this specific value comes from, it is listed inside the FormXml definition as the value for CheckBoxControl, or you can export another form with a checkbox and you will find the same guid value.

Done with the edit I saved the file, zipped the solution files, imported and published, and finally the Quick View Form now shows a checkbox:



Hope it helps!

January 27, 2018

365 Saturday London: recap of the Community Event

As I anticipated in my previous post, this weekend I attended the 365 Saturday event in London (http://365saturday.com/dynamics/london-jan2018/), if I need to describe the event in one word? EPIC.

This 365 Saturday was a 2 days event, the first part on Friday afternoon with the Hackathon and the second part on Saturday with many sessions (there were 5 tracks!) from early morning until 6pm, practically a full day of Dynamics 365 content.

The Friday Hackahton was divided in two tracks, the first one regarding Field Service by @BenVollmer from Microsoft the second track was focused on various aspects of Dynamics 365: Machine Learning, Microsoft Portals, Xamarin and XrmToolBox, the must-have tool for Dynamics professionals. Personally I followed the Field Service part of the Hackathon and during the breaks I snooped into the other track :)

The Hackthon was very interesting but Saturday has been off the charts. The day started with the keynote of James Phillips, Microsoft Vice President in charge of the Dynamics products and he dropped the big news of the day: Microsoft decided to revert the deprecation of the the Outlook Client, I will not go into the details as I am sure in the next days there will be detailed blog posts regarding this important announcement.

As I don't have the gift of ubiquity (yet) I was able to attend only few sessions, I started with the one by Ramón Tébar Bueno and Baris Kanlica regarding Dynamics 365 v9 I did a speech at CRM Saturday Milan back in November about the same argument, but this session confirmed me one thing: Dynamics 365 v9 is full of new features and is difficult to concentrate all of them inside 1 hour.

The second session I followed was the "GDPR Considerations" by Mohamed Mostafa GDPR is a delicate argument and the deadline (25 May 2018) is near the corner, we (Dynamics professionals) should focus more on this topic and Mohamed session was very helpful to understand some of the key points of the regulation.

The next session was "Resource Scheduling Optimization" by Ben Vollmer, a different session was scheduled for this slot but the speaker was not able to attend, so Ben kindly step in and delivered this unexpected session regarding Field Service RSO. Resource Scheduling Optimization is a very interesting tool and I'm glad that I learned something about it.

The last session was about PowerApps, Flow and PowerBI, delivered by Darshan Desai and Rory Neary The first part Darshan talked about PowerApps and Flow and the second part was delivered by Rory where he presented an interactive PowerBI dashboard embedding a PowerApps app designed for James Bond (the event was in UK, logical choice), the session was the right mix between technical content and entertainment.

Last but not least, the 365 Saturday supports women in tech, Janet Robb who works for Microsoft and helped in the organization of the event is our advocate for this important cause: I'm very happy that I joined the first 365 Saturday of 2018, I met old friends, made new ones and meanwhile I learned something new about Dynamics 365, it's amazing. Last thing: don't forget to check their website (http://365saturday.com/) for the upcoming events!

September 21, 2017

Microsoft Portals Source Code Teardown - Episode 1 - The Solution

If you are reading this post you probably know that Microsoft released the source code of the Microsoft Portals (former ADX Studio) under the MIT license.

I have a fair experience with the code of ADX Studio 7.x but this release include also the source code of some DLLs, so I thought that analyzing parts of the source code can be interesting for Dynamics developers.

Download link: Microsoft Dynamics 365 Customer Engagement Portals Source Code
The file of interest is MicrosoftDynamics365PortalsSource.exe, after extracted the main Visual Studio solution (Portals.sln) is under the folder Solution\Portals\

In this post I will focus on the project in general, in the next episodes I will examine specific pieces of the source code that I find interesting.

The main project is MasterPortal, it is an ASP.NET MVC website configured to run with .NET Framework 4.5.2 and basically is the upgrade of what we got with the previous ADX Studio Portals.
The second project is Framework, this is the source code of the ADX Studio DLLs, like Adxstudio.Xrm.dll and the now "obsolete" Microsoft.Xrm.Client.dll, inside this project the first surprise, a project called SafeHtml, from a quick look (and as the name suggests) the purpose is to sanitize html inputs, a good candidate for a future post.

Now let's check the nuget packages, beside the standard packages used by ASP.NET MVC, the Portals solution also references these packages (this is not a complete list, only the ones that got my first attention)
  • Bond.CSharp - Bond is an open source, cross-platform framework for working with schematized data. It supports cross-language serialization/deserialization and powerful generic mechanisms for efficiently manipulating data. - I will check where this "framework" is used inside the portal
  • Lucene.net - Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users. - I worked with Lucene.net some years ago for one university exam, is a very powerful library
  • DotLiquid - DotLiquid is a templating system ported to the .NET framework from Ruby’s Liquid Markup. - So this is the library used by the Portals to handle the liquid templates
the first sneak peek inside the Portals source code ends here, see you soon!

May 15, 2017

CRM Saturday Zurich: recap of the Community Event

Last weekend I attended #CRMSaturday in Zurich, for those not familiar with the name, CRM Saturday is a series of events across Europe (but they are going global with the July event in Australia) focusing on Dynamics 365 for Customer Engagement (or Dynamics CRM if you prefer).

Conferences and events like this are an important part of the CRM ecosystem, when you work on a platform like Dynamics 365 that implements new features rapidly, a community event can be a perfect opportunity to keep yourself up to date learning something new or go deeper with a specific functionality.

The location for the Zurich chapter was the Microsoft Offices in Switzerland, a perfect venue considering that this was a joint event with SharePoint Saturday Events, the available tracks in totally were three (2 for SharePoint and 1 for CRM).

Stefano Tempesta, one of the organizers of CRM Saturday, gave an introduction before the keynote of Kathrine Hammervold from Microsoft Norway.
The CRM track started with the session of Baris Kanlica titled "Dynamics 365 new features and deprecations", with the upcoming release this is an hot topic and personally I learned about the use of control notifications (Xrm.Page.getControl(arg).setNotification(message,uniqueId)) The next speaker was Razwan Choudry with his session about Solution Management. How to manage solutions, how to implement versioning and the infamous "Add all assets" checkbox were some of the topics covered. The message was to put more attention on the maintenance and the deployment of a solution, and I couldn’t agree more. After the lunch break was the turn of Marius Agur Pedersen with his session about Azure. He focused on Azure Service Bus and Azure Key Vault, we can bet that Azure and Dynamics 365 will be more integrated in the future. I am often inclined to don't use Azure Service Bus, but with Marius reassurances about the bus performance I will try it again. The following session was with Jordi Montaña and his testing framework Fake Xrm Easy. Unit testing is a must for medium and big projects, but should be also a priority for smaller projects that contains only a couple of plugins. The framework he created is impressive, I know how broad and different are the CRM messages and the IOrganizationService and to mock all that stuff requires countless hours. Next to the stage was Christoph Mäder with his session to improve the performance of a Dynamics CRM/365 OnPremise instance. Many customers still prefer to have their CRM in house or they are not ready to move to the Cloud, but this doesn't mean that they can't tune their instance or take advantage of some possibilities offered by an OnPremise installation. The last one to speak was Mohamed Mostafa with the other side of the medal: Considerations for Cloud Dynamics 365 Deployments. His session went through the major aspects of an Online implementation, the compromises and the big advantages to have Microsoft taking care of your instance, considering also the upcoming EU GDPR (General Data Protection Regulation). It was an amazing event and experience for me, I had the chance to met in person people that I know virtually from a long time. Despite some tweets that list me as speaker, I only attended and I was not involved in the organization of the event, all the credits goes to the other guys in the next picture, they used their time and energy to make this happen, I'm honored to know them and they are an inspiration for the community. CRM Saturday was free, so a "thank you" should be made also to the sponsors. Bottom line: attend the next CRM Saturday!