0:00
C Sharp, Dynamics 365 and today we're getting them married
0:05
Hi everyone, welcome to a new episode of Dash of .NET. Today we are joined by an absolutely amazing speaker
0:11
She's very well known in the community and today we're gonna talk about how much C Sharp
0:17
can be accommodated in Dynamics 365. And to talk about that, we're joined by Maria
0:22
She lives in Greece, beautiful country. She's a Microsoft MVP, software engineer
0:27
and I'm really excited to host her today. So without any further ado
0:35
Maria, welcome to the Dash of .NET show. Hello, I am happy to be here today with you
0:45
Maria, thank you so much for accepting the invitation. We always enjoy you hosting at C Sharp corner events
0:51
We're gonna do a lot of chit chats and towards the end if we get time, but at the moment I'm gonna share your screen
0:57
Everybody else can see your screen in the stream and next 20 minutes is all yours
1:02
Thank you, thank you very much. So our discussion today will revolve
1:09
around the C Sharp integration with Dynamics 365. As Simon told before, I am Maria Anastasia
1:19
a graduate of Computer Engineering and Informatics Department at the University of Batras
1:25
In addition, I have held the title of Microsoft IOT MVP for the past two years
1:34
and I am also a Gold Microsoft Learn Student Ambassador. Professionally, I've been immersed
1:40
in the development world and currently I work as a software developer at BeWise
1:47
specializing in CRM systems implemented with the Power Platform and Dynamics 365
1:57
Beyond my work, I work at the head of a robotics educator
2:02
sharing my knowledge and various robotics centers here in Rhodes where I live
2:10
My passion for technology extends to education, leading me to pursue a master's degree
2:16
in teaching technology, math and science over the past year and a half
2:24
This academic pursuit reflects on my commitment to fostering a deeper understanding
2:30
of technology in others. To share my insights and experiences, I maintain a blog that publishes weekly
2:40
posts that covering topics such as IOT, Power Platform and Dynamics 365
2:47
Additionally, I seize every opportunity to engage with the community through social media
2:54
and through talks on these subjects whenever my schedule allows. Our discussion will explore the landscape
3:07
of C-Sharp development, examine how this language work within Dynamics 365 with a primarily emphasis on solutions tailored
3:19
for customer relationship management, CRM. Furthermore, we will dedicate some time to unravel debugging, a challenging aspect
3:29
often encountered by professionals in this field. To illustrate the concepts discussed
3:38
we will culminate with a demo. Following this, I will share valuable resources
3:47
and references for those angered to delve deeper into the topics we've covered
3:55
Let me provide a brief overview of Dynamics 365 for those that might not be familiar with this platform
4:04
Dynamics is a set of connected modular software as a service applications and services
4:10
built on Microsoft Azure and designed to transform business activities. Dynamics consists of CRM, ERP, AI, mixed reality
4:22
and modular intelligent business applications that offer a complete set of solutions
4:28
across marketing, sales, commerce, service, finance, operations, and talent. It's integrated with productivity apps in Microsoft 365
4:41
such as Excel, World Outlook that we will watch it in our demo too
4:51
and others. And it's connected with Microsoft Power Platform such as Power Apps, Power Automate, Power BI
5:02
and Power Virtual Agent. The motivation behind this presentation stems from a desire to engage software developers
5:15
who have a preference for coding but may not have explored the possibilities
5:22
of integrating their code into a low-code environment. In the realm of low-code platforms
5:30
that is platforms that require little code development, there is still a need for custom code
5:41
Customers offers, sorry, customers often require services that the existing platform doesn't provide
5:51
or seek integrations with other platforms necessitating the expertise of custom code developer
5:59
to fulfill these requests. Now, one might ponder, why should I delve into low-code
6:06
instead of continuing with traditional software development? Compiling statistics from the reputable Gartner Group
6:18
forecast that by 2025, next year, 70% of applications will be created
6:27
using low-code or no-code platforms leaving only 30% to traditional development methods
6:37
This signals a significant upward trend in the adoption of low-code and no-code platforms
6:45
presenting an opportunity for us to leverage this growing market. The surge in popularity can be attributed
6:55
to financial resources. Additionally, the shift towards low-code options has accelerated particularly in the wake of the pandemic
7:08
where businesses shiftly embrace the digital realm. While I firmly believe that traditional development
7:17
will always have its place and enthusiasts of course, today's presentation aims to showcase an alternative
7:27
Even if you are a seasoned software developer, there is value in exploring low-code and no-code options
7:35
due to their faster design and development processes. This presentation serves as an introduction
7:48
to this alternative path, providing insights into the changing landscape of software development
7:57
Before we delve into the practical aspects of custom code in the dynamics environment
8:05
excuse me, let's consider one last compelling statistic. The well-known Forrester Group
8:13
conducted a survey revealing that the market for low-code platforms is projected to reach
8:24
200 billion by next year. This sizable figure underscores the immersed growth
8:42
potential within the low-code landscape. As we witness this market projection
8:53
it prompts to ask, why not position ourselves within this dynamic market
9:04
The opportunities appear abundant and it's an opportune time to explore and embrace the potential that this growing market offers
9:17
So, we can develop code in Microsoft's low-code platforms with these three languages
9:24
JavaScript, C-Sharp and SPFx. JavaScript for crafting custom user interface and functionalities that directly interact with users
9:39
C-Sharp for implementing complex functionalities, business logic computations and data management by creating plugins
9:49
And last but not least, SPFx for custom applications and components that operates within the SharePoint ecosystem
9:59
Each of these tools provides different capabilities and the choice of language depends on the specific goals
10:08
and requirements of the application being developed. But today, of course, we will deal with C-Sharp
10:17
Let's transition to the practical demonstration to better understand what custom code truly entails
10:28
within the dynamic environment. So, if you create a new appointment in CRM
10:38
the system automatically sends appointments to attendees. However, there might be scenarios
10:45
where you want to prevent CRM from sending these appointments. While the system itself doesn't provide an option
10:55
to disable this behavior, a workaround exists. To address this, I have developed a C-Sharp plugin
11:07
One specific button here, you can see it here, which I added, I added this button
11:21
which this button is set to no. The plugin automatically appends this line
11:28
send no invitation to attendees to the end of the appointment description
11:39
Moreover, I configured a rule in exchange to delete the automatically created message
11:46
without notifying the recipient. This process ensures that the necessary information is added to the appointment
11:57
and the exchange rule effectively controls the sending behavior. To accomplish this, a user with admin rights
12:11
must log in to the Microsoft 365 admin center or from the admin.microsoft.com or from Outlook
12:22
There, admin has to select the exchange and then mail flow. After that, has to add a rule and create a new rule
12:35
And there, the admin has to apply this rule if the subject or body includes any of these words
12:46
send no invitation to attendees. And also had to select, do the following
12:56
delete the message without notifying the recipient or sender. So here we have our code
13:09
And as I told you before, the code is a dynamic CRM plugin
13:16
designed to control the behavior of sending automatic email invitations when creating or updating appointments
13:27
The primary goal is to append a specific information to the appointments description
13:35
to prevent the sending invitations. The plugin is triggered on the create of all attributes
13:44
and on the update of some of the attributes, the attributes optional attendees
13:52
required attendees, description and invitation sent, which is the button. The get organization service that is here
14:09
This method initialize common parameters such as the plugin context and organization service
14:24
And here it's an if statement for update and create as I told you before
14:31
And here you can take a look at the context and take the information of the entity
14:42
and some error handling here. In the next slide
14:52
we have the rest of the code and we have the process record method
15:03
that is responsible for handling the core logic of the plugin. It retrieves information from the CRM record
15:12
related to the appointment, such as description and invitation not sent, that is the custom attribute indicated
15:25
whether an invitation has been sent. If conditions are met, excuse me
15:34
if the conditions are met, the plugin updates the description attribute with the prevent attribute text
15:44
So this code is for the core logic and we have this if statements
15:58
to handle whenever the description has to be sent to update it and to add this line
16:16
I mentioned before. And the last screenshot from my code, here I think that here it's the registration
16:34
of the description code for the description. And here we have the strip HTML tags method
16:49
that is a helper function that uses regular expression to remove HTML tags from the input text
16:57
This ensures that the description is a clean text only format. The code also includes error handling
17:09
to log any exceptions that may occur during execution. This is done using the eye tracing service interface
17:18
that you can look here or before, as I showed you before
17:29
Now, debugging is hard for many low-code developers. Here is a conversation I had on X
17:42
with an X Dynamics 365 developer. But here this developer told me
17:54
that just seeing the words Dynamics 365 gives me horrible flashbacks. And I wondered why, I wondered why
18:12
And he told me that for a brief time, I worked for a startup that built their entire business
18:19
on Dynamics 365. And I was hired to help them cover their flows to plugins
18:29
Doing actual coding, CSR, for the platform was beyond convoluted and debugging was a nightmare
18:41
Never again will I touch the Dynamics 365. But I don't think that debugging is that hard
18:55
even in Dynamics 365. But I think that you have to get used to it
19:08
With the plugin registration tool, debugging becomes much easier
19:20
At first, you have to register your plugin and its steps. Here is the plugin and here we have the two steps
19:32
create of appointment and update of the appointment. And then you have to attach the plugin registration tool
19:42
in Visual Studio. After that, you can debug as you know
19:52
and as you had in pure CSR. You can see in this screenshot
20:03
it's from the code I showed you before. The debugging is like I have another CSR code
20:18
without all the Dynamics involvement. So let's explore some examples of debugging
20:33
Here are some valuable resources that I have gathered. First, we have Microsoft Learn
20:41
an essential platform for every local developer. Following that, I highly recommend checking out
20:53
Carly D'Souza's blog, the insightful D365 Demi Satisfied blog and Hubside 365
21:09
These have been my go-to references when seeking assistance. And I'm confident that they can be beneficial for you too
21:22
And as we dive into these resources, let me also share my blog, my has no blog
21:34
In my blog, I focus on creating posts aimed at assisting beginners
21:40
However, I have plans to share tips and solutions for more advanced challenges soon, so you can stay tuned
21:50
And here I have my information. And if you found today's presentation interesting
22:05
or simply want to connect and learn more about me, let's stay in touch
22:11
You can catch me on X, where I am actively daily to weekly
22:18
post there. For a glimpse into my professional journey and key milestone milestones in my career
22:31
feel free to connect with me on LinkedIn. And for the easiest way to find all of my links
22:38
including X, LinkedIn and my blog, and also my has no blog
22:45
you can check out my bio link. I think it's extremely easy, bio.link slash Maria
22:54
It's a one-stop hub, housing all my social media and various other links that I find useful
23:02
And I'm looking forward to staying connected. So thank you so much for listening to my presentation
23:15
Thank you so much for being here. And I want to give a big shout out to C-Sup Corner
23:26
and of course to Simon for all the content they made for our community
23:35
So thank you and let's continue being passionate about what we do
23:43
Wow, Maria, that was absolutely great session. And just the way the heart is beating on the screen
23:50
you know, when you were giving a presentation, there was so much rhythm, you covered so much in just about 20 minutes
23:55
right from your slides, then you moved the demo. And what I really loved about your presentation
24:00
that you ended with a resource slide, that, hey, you can follow this guy, you can read this blog, you can go to Microsoft Learn
24:06
I'm sure everyone who has bought has got to learn a lot from this session
24:10
And if they go and check those all sessions, the resources that you have shared
24:14
they'll get to learn a lot. Maria's all details, social handles, you can find in the video description
24:20
Thank you so much, Maria. That was great. We always love to have you back
24:24
And yeah, can't wait to host you once again. Thank you so much and we'll see you soon. Bye-bye