Posts Tagged ‘ what is Dynamics 365

How to Clear Batch Job History?

In this article, I will explain how you can periodically delete the Dynamics 365 Finance and Operations batch job history. I’ll use a standard clear batch job for this.

Run the class using Modules> System Administration> Periodic tasks> Batch job history clean-up (custom).

Image-1

With the History Limit field, you will delete records older than 30 days. Here you can enter any day you want. You will determine the properties of the records you want to delete with the Filter option.

Image-2

I filtered the records in Ended status which are in the USMF company.

Image-3

Let’s set the recurrence now.

Image-4

I set it up to run once a week on Sunday.

Image-5

When I click OK, a message appears saying that it was added to the batch queue.

Image-6

Let’s go to the batch jobs and check it.

Image-7

The batch job is there when I search for it. I could make it so that it worked without being connected to the batch job. I could choose different recurrence. These need to decided depending on your data.

Image-8

In this article I have explained how to clear batch job history. There are many similar clean-up classes in the application, which I will talk about in due course. These must be established and tracked in order for the system to be healthy. Especially in cases where there are a large number of batches, these tables can fill up very easily and it is necessary to track them and determine the correct period.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Batch history clean-up, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apss, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

How to Create a Batch Job with SysOperation Framework?

In this article, I will try to explain how to create a new Batch Job for Dynamics 365 Finance and Operations using SysOperation.  We can say that SysOperation is a more advanced version of RunBaseBatch. It has many different uses. In this example I will explain its usage as a normal batch job. As for its structure, SysOperation uses the MVC (Model – View – Controller) design pattern. The basic classes of this structure are:

Service: The service class is derived from the SysOperationServiceBase class. It is the class in which the process is done. Our codes should be in this class.

Data Contract: It is the model class for which we define attributes. The DataContractAttribute attribute is used to get data from the dialog.

Controller: The control class is derived from the SysOperationServiceController class. Stores information about the batch job. Such as dialog and progress bar.

UI Builder: The UI Builder class is derived from the SysOperationAutomaticUIBuilder class and is used to provide more advanced interfaces to dialogs.

In this example I will do the same as we did with RunBaseBatch using the first 3 classes. First I create a new project.

Image-1

I add a new class.

Image-2

The first class is the control class. We haven’t created the service class yet, but I identified and typed its name.

Image-3

Let’s create the service class now.

Image-4

I write the code below. Actually I need the Contract class here. Let’s create it.

Image-5

I create the Contract class. Usually this class should be created first. But if your design is clear, it doesn’t matter which one you start with. You won’t be typing these codes over and over every time, you will use them from a template.

Image-6

I want to get two variables here and edit my class accordingly.

Image-7

I create a MenuItem.

Image-8

I link my control class to the MenuItem.

Image-9

After this stage, compilation is required. It’s not enought to just compile the project. Therefore I click Build models.

Image-10

Click Select all on the screen that opens and start a Build operation.

Image-11

After the Build operation is completed, mark your MenuItem as the starting object and run the project. Our class worked. You can run it directly just like you did with RunBaseBatch.

Image-12

You can add it to a batch job if you want. I added it to a batch and set it to run one time.

Image-13

Now let’s open the Batch Jobs form. Let’s find our own batch job and take a look at the progress. It is Ended, which means it worked and finished. If it was a recurring job, it would be in Waiting state. I click on Batch job History to check what our batch job has done and whether it worked correctly.

Image-14

I click Log from the details of the job and it shows the output of the batch. It worked without any problems.

Image-15

In this article, I tried to explain how to create a new batch job using SysOperation. SysOperation is a very extensive topic. I will continue to explain it with different viewpoints. Especially Parallel processing works very well in terms of performance. I’ll explain how to use it in an example.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Batch Jobs, SysOperation, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apps, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

How to Define Authorization from Dynamics 365 Finance and Operations Development Environment?

In this article, I will try to explain how to create authorization objects from Visual Studio through the Dynamics 365 Finance and Operations development environment. In my article named How to Define Authorization from Dynamics 365 Finance and Operations Interface? I explained how the authorization objects are created from the interface. As I said in that article, my preference is to create the authorization from the development environment. There are several reasons. Most importantly, objects created from the development environment can be included in version control. In this way, they will be directly in your package and the transfer to the desired environment will be made with your development. I think it’s easier to manage.

I will now do the same example that I did in my previous article through Visual Studio. My test user only has the System user role.

Image-1

My test user can only see two modules in these roles.

Image-2

I want to authorize the All customers form.

Image-3

I find the relevant MenuItem on VS. This will be my entry point (EntryPoint) and all authorization assignments will be done through this entry point.

Image-4

I go to my project and add a new object.

Image-5

First, we will create a Privilege. I select and name it, and click add.

Image-6

Drag and drop the CustTableListPage MenuItem to the Entry Points tab of the Privilege created. Entry point is created. From its properties, select delete as the Access Level. Delete means full authorization. You can choose the level you want from here. Update and Correct might be confusing for you. Update is the data update authorization. Correct is used in tables with Valid Time State property.  Valid Time State is a mechanism that allows you to perform automatic date checks. I will prepare an article about this later.

Image-7

Now create a Duty.

Image-8

Drag and drop the Privilege to the Duty you created.

Image-9

Next step is creating a role.

Image-10

If you want, you can grant Privilege directly to the role you created, but it’s best to follow the steps. That’s why we used Duty. You can drag and drop it. The new role is created.

Image-11

In some cases, it may be necessary to clear the Caches. You can call the SysFlusData class as shown in Image-12.

Image-12

Objects you create via VS will not appear directly in the application. I’m not so sure why but they are visible after DB sync. This is actually data. I don’t know why it needs that.

Image-13

After these operations, you will see the objects you have created when you open the application.

Image-14

You assign roles to our test user.

Image-15

When you log in to the application, you can see the All Customers form.

Image-16

In this article, I tried to explain how to create security objects via VS. You must take the security and authorization very seriously. If not set up correctly, it can get messy. Try to manage it from the highest level possible. If you go deep into details, it becomes very difficult to manage. Do it if the new role is really required. Use Duty to get things done as much as possible. Do not assign more than 3-5 roles to a user. Too many roles can lead to performance issues.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Security , Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apss, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

How to Move Dynamics 365 Finance and Operations Security Objects?

In this article, I will explain how you can move security objects to different environments through Dynamics 365 Finance and Operations application. To do this, I prefer to create objects in Visual Studio and follow the classic development process. However, a software developer is needed for this, and software developers do not always do the security work. So we can perform the same process from the interface. Actually, this is a standard Export / Import process. Now let’s see how it is done.

I will use the role I created in my previous article. I open the System Administration-> Security Configuration form.

Image-1

I choose the role I want to export and click Data->Export.

Image-2

It creates an xml file. You can save it anywhere you want.

Image-3

It is useful to examine XML, you can see more clearly what you have exported.

Image-4

This is the Export process. Let’s delete this role first in order to be able to Import it.

Image-5

Deleted or imported objects go to the Unpublished Objects tab. When you publish from here, the process is completed. To complete the deletion, click Publish All.

Image-6

Click Import from the same menu.

Image-7

Select the Exported file from the window that opens.

Image-8

After the selection, import process takes place. Your objects go to Unpublished Objects again. Here, different objects appeared. I investigated the reason for this. When exporting, people say that related objects appear here. It didn’t make much sense, but you should click Publish All.  After that, if you look at the Role list, you can see that the role you deleted appear.

Image-9

In this article, I briefly explained how security objects can be Exported / Imported through the application. There is a point to note here. If the security objects belong to a newly developed application, these objects must be moved first. Otherwise, you make an incorrect operation.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Security Export Import, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apps, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

How to Define Privileges from Dynamics 365 Finance and Operations Interface?

In this article, I will explain how to create privilege objects from Dynamics 365 Finance and Operations interface. In my previous article, I explained how fatih.test user was created. I will show an example based on this user. I deleted all roles of the user except system user. I will define a new role and grant privilege a certain object.

Image-1

You can see the menus in Image-2 only when you enter the application with the System user role.

Image-2

In this example, I will define a role that is authorized only for the All Customers form.

Image-3

First, find the name All Cutomers MenuItem. I looked it up from the development environment. You can also see it on the form. CustTableListPage

Image-4

Open your application with a user that has admin privilege and open the System Administration -> Security Configuration form. Got to the Privileges tab and click Create new. Enter the name from the window that opens and click OK.

Image-5

You must define the privilege for the privilege created. We want to authorize a Display menu Item. While on the Display menu Item record, click Add references. Filter and select CustTableListpage from the window that opens. Select Grant for all of them and click OK. We have defined the authorization.

Image-6

Go to the Duties tab and Click New. Enter a name and create.

Image-7

In order to add Privilege over the resulting Duty, we select the Privilege we created by clicking Add Reference.

Image-8

Go to the role tab and create a new role.

Image-9

Similarly, add the Duty you created previously as a reference.

Image-10

After these processes, the role privilege definition is finished. But first we need to Publish these objects.

Image-11

After publishing the privilge objects, go to your user, click Assign Roles and select the role you created from the screen that opens.

Image-12

When you log back into the system with your test user, you will see the menu you have authorized.

Image-13

In this article, I tried to explain how to create privilege objects in the simplest form through the application. Creating from the screen like this something I am not used to. I prefer to create it from the development environment. Also, objects are not created when you create them from the screen. Therefore you need to use Export-Import to move them to other environments. I will also talk about this feature. In addition, I will explain how to make privilege definitions through the development environment in my next article. Privilege is an extensive topic. I will try to talk about all the details.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Security, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apss, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

Dynamics 365 Finance and Operations Security Infrastructure?

In this article, I will try to explain the Dynamics 365 Finance and Operations security architecture. There is a docs article that I like very much, I will try to recap the topics by referencing it. It is very important to understand the security infrastructure. In today’s projects, managing security and authorization can be a very demanding process. In order to manage the needs correctly, it is necessary to know the infrastructure and the features, capabilities and constraints of security tools. In this article I will address the following topics. I did not translate them into Turkish. Sometimes there is a semantic shift, so I think explaning them is better.

•             Security architecture

•             Role-based security

•             Duties

•             Privileges

•             Permissions

•             Authentication

•             Authorization

•             Auditing

Finance and Operations application uses role-based security structure. Authorizations are given to roles, users are not directly authorized. Users are assigned roles. A user without any role has no authority in the system. The user assigned the admin role has full authorization. More precisely, they are not subject to any restrictions. Role-based security is a hierarchical structure as seen in Image-1.

Image-1

Role-based security

Role-based security has actually been created parallel to the work of business units. Role is the structure in which the necessary authorizations are gathered for a position with certain duties to fulfill those duties. The role is actually parallel to the employee’s actual job in the company. It does not mean that every employee has a role. In some cases, a single person may be managing different business processes. So they must have multiple roles. It is essential to organize roles according to the job, not the person. At least one role is required to log into the system. Generally, everyone is given the role of System User.  You can use the System administration > Users > Assign users to roles form to assign the role.

Role assignment is made by admin accounts. Basically, roles consist of Duties and Privileges.

Image-2

Duties

Duties are where the necessary authorizations are gathered to carry out a certain work process. A task can be assigned to multiple roles. Therefore, a change you make to the duty automatically affects the assigned roles. The role can be assigned directly in Privilege, but for a more manageable infrastructure, it is necessary to create and use the duties.

Image-3

Privileges

It is the structure where the authorizations required to do a certain job are gathered. For example, the payment cancellation privilege only has the authorization required to do this job. You can give this privilege directly to the role, but as I said above, it would be a better approach to collect them in duties and assign them to roles. Security and authorization objects are defined for all objects in the system. You can find and replace the ones you need and add new ones. Especially in new developments, it is absolutely necessary to create Privilege. Duty may not be required for every development. It may be enough to grant this authorization with a specific duty, but not without Privilege.

Image-4

Permissions

Permissions refers to the level of authorization to access a specific object. This can be a MenuItem or any object. Generally, authorization is given through the entry point. And these are usually MenuItems. In some cases we also use it to directly define authorization for an object of the form.

Authentication

This is my favorite feature in the new version. I can use all tools with a single email. One of them, of course, is the Finance and Operations application. To enter the application, your user login must be created. I explained it in my previous article. Usually users are expected to be in Microsoft Azure Active Directory (AAD), but you can also add external users. You can set up 2-step verification.

Authorization

Authorization controls access to the Finance and Operations application. Security permissions are used for this. Security permissions determine how certain objects of the application are accessed. These objects are: menus, menu items, action and command buttons, reports, service operations, web URL menu items, web controls and fields.

Finance and Operations application uses a context-based security, so we define the level of access to a certain object. When you associate a privilege with an entry point, you also define an access level. Such as Read, Delete, update.

Auditing

User login and logout times are recorded. You can access these records from the admin account. (System administration > Inquiries > User log).

In this article, I tried to introduce you to the security infrastructure. It is a very extensive and detailed topic. Generally, projects have a person or team responsible only for these processes. When not designed correctly, maintenance costs and problems can be annoying. It is imperative to place the due importance and test well during the project phase. Generally, since consultants have admin privileges, they can skip tests with the required roles. Here it is recommended that key users do tests with the relevant role, not as an admin. I will continue to address security-related issues.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, security architecture, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apss, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

What is Dynamics 365 Finance and Operations Segregation of Duties?

Segregation of Duties görev ayrılığı olarak çevriliyor. Let me explain it with an example. Let’s say you want two critical Duties not to be assigned to the same person. For example, two duties such as invoice processing and payment should not be assigned to the same person. You are in a company where thousands of people work and it is not possible to track at a certain stage. Here SoD comes into play. A definition you make through Duty gives you a warning for such situations and allows you to control them.

Let’s see an example using the security objects we used in previous articles. Open the Security Configuration form.

Image-1

From the Segregation of duties tab, click on the Segregation of duties rules button. This form is also available directly on the menu. You can see it in Image-9.

Image-2

There are no records yet in the form that opens. Let’s create one by clicking New.

Image-3

Specify a name and select two Duties. I have chosen two sample Duties. The only thing I pay attention to is, I know which roles these two Duties are used in. I will need it to show the example. Of course, you will make this definition according to your business needs.

Image-4

After saving, it comes to my test user. FD Customer listing task is attached due to its current role. I add a new role and select one that includes Customer Invoicing. When I click add, there is a warning saying that a conflict occurred. If I click Yes, it will create a solution record for me.

Image-5

The record created includes information about this operation. I can accept assignment with the Allow Assignment option.

Image-6

Accepting means overriding the rule, so it asks for an explanation. After providing one, we have added the role. We could have blocked it if we wanted to.

Image-7

When you create a new SoD, you can check if there are anything that does not follow this rule. There is something that doesn’t follow my rule, but since we created an override record it didn’t appear here.

Image-8

You can follow the created records from the menu in Image-9.

Image-9

In this article, I have tried to explain briefly what Segregation of Duties is. Although it is a very nice feature, it still has many deficiencies. For example, it only works with Duty, but there is no solution for direct Privileges assigned to a Role. It asks when adding it to the role, but it does not have a mechanism that controls the changing duty contents afterwards. It is possible to use it. Especially if you do not define authorization other than Duty and create your Duties with the right logic, you can use it very easily. Investments are still being made in this feature, I think it will become much more developed in a short time.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Segregation of Duties, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apps, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

Dynamics 365 Finance and Operations Data Management 2. How to Transfer Data Again Using Old Projects?

Dynamics 365 Finance and Operations Data Management 1. How to Import Data? Dynamics 365 Finance and Operations Data Management 1. How to Import Data? Now I will try to explain how we can transfer data over and over again using the project we created in that article.

We had created a transfer project for VendGroup. Currently, the data is as in Image-1.

Image-1

This is the CSV file I just created. I will use this for import.

Image-2

Open Data managament. In the All projects section, we click on our project and open it.

Image-3

Click Re-import from the Import Options tab.

Image-4

Click Upload file on the page that opens.

Image-5

Select the import file and click Upload. Then click OK.

Image-6

You have uploaded your file. Now you can click Import.

Image-7

The information screen will appear. Close it and wait for a while.

Image-8

If there is no problem, you will see a screen like the one below. If there is an error, you can see its details on this screen as well.

Image-9

I renew my form to see if it really worked and see the data is there.

Image-10

In this article, I tried to show how you can transfer data over and over again through a project that we have created and established before. These very useful features are generally used by consultants, but it is necessary to provide good training to the users and ensure that they benefit from these features.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Import, DMF, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apss, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

How to Move Developments to Dynamics 365 Finance and Operations Test and Live Environments? 3- Build

How to Move Developments to Dynamics 365 Finance and Operations Test and Live Environments? 3- Build

In this article, I will talk about how to perform the Build operation required to move the developments we made from Visual Studio for Dynamics 365 Finance and Operations to Test and Live environments. Build needs to be performed on a certain Branch. When Build is complete, if there is no error, it will generate a Deployable Package for us. We need this package for code migration.

You have to perform Build through Azure DevOps, not from Visual Studio. After logging in as a user with admin rights, open the Pipelines tab. Unified Operations platform – Build Main will be created automatically when you set Azure DevOps settings via LCS. We will take this as basis. Since our environment is only Main Branch, I continue without making any changes in the basic settings.  First let’s see how we can run it, then we will examine the other settings.

Image-1

Click the Edit button from the ellipsis menu.

Image-2

Build steps are listed.

Image-3

If you want to build a different Branch, you need to change the Server path. We are making a change here.

Image-4

You can right click and Disable steps that are not required at this time. I disabled the Deploy Reports step because I do not have a report development.

Image-5

The main step is Build the solution. Our Branch path is here again. If you want to build a different Branch, you should change this as well.

Image-6

Click Queue. Whn you click Run in the popup window, Build operation starts.

Image-7

You can follow the Build steps.

Image-8

If it completes with no errors, it will look like the following. If it gives errors, it is necessary to examine the logs and errors. Generally there are not very complex problems. There are cases such as missing reference, incorrect Check-in, but there may be situations that need to be further examined. You can open it by clicking on the record.

Image-9

When you enter, all your previous Builds will be listed. You can view their status and information. The first record is our last Build, completed without error. Click to open it.

Image-10

You can see details about the Build here. Click and open the relevant part (3 published).

Image-11

Under Packages, Deployable Package starting with AxDeployableRuntime is created. We need to download it from here and upload it to the LCS. I will explain this in my next article.  At this stage, the Build operation is done. Now let’s look at how you can create a new Pipeline.

Image-12

Main Pipelines are created by default. If you want to create them in other Branches, you either make all the definitions manually, which is very demanding, or you can use the Clone or Export features. For both cases, do not forget to change the path settings for the new Pipeline.

Image-13

You can Import the Exported file from the following path again. Generally code is transferred to live environment from Main or Release Branch, and to test environment from Dev Branch. Of course, these are approaches that vary depending on the project and the team.

Image-14

In this article, I tried to explain how Build is triggered through Azure DevOps. A machine is required for Build right now, but we will soon be able to do this thanks to an agent. It will be a faster and inexpensive solution. By completing this stage, we have reached the final stage in code migration. In my next article, I will explain how we deploy code over LCS.

Regards.

www.fatihdemirci.net

Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Build, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apps, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

How to Add a User to Dynamics 365 Finance and Operations?

In this article, I will try to explain how to define new users for Dynamics 365 Finance and Operations. If you want to add users to the test and live systems, you usually use import from Azure Active Directory. If you want to create a test user for your development machine, you can create a new user. Let’s take a look at both now.

First, open the System Administration->Users form. You must login as a user with the Admin right. If this is a development environment, the account you used for installation already has this right. I explained it in my previous articles.

Image-1

Click Import users, and the page that opens lists the users we can import. You can import the users you want.

Image-2

An information message appears. Then you need to grant the users the necessary roles. In the old version, there was a role assignment tab during Import. The new version does not have it. I think it was a nice feature. It gets messy especially when I transfer multiple users.

Image-3

Now let’s add a user that is not in Azure Active Directory. For example, I need to do some tests on my own development machine, or consultants need to do the initial tests in VM. Of course, security should be involved in these tests because when I open the application via VS, it opens as Admin and does not have any security restrictions. I need a user to assign the required roles. So I need to create a new user.

I click New and start creating. I enter the user information. I used a Hotmail account. You need to change the Provider according to the account you use.

  1. If it’s an account that’s in its own AAD Domain: https://sts.windows.net
  2. If it’s an account that’s in a different AAD Domain: https://sts.windows.net/XXXXX.XXX, (https://sts.windows.net/emiralfg.com)
  3. If it’s a Microsoft account: https://sts.windows.net/hotmail.com

Image-4

User is created after saving. In Image-4 the Provider is missing. It should be as in Image-5. Add new role by clicking Assign Role. Here you can assign any role you want. You can also have your own roles created for testing. Since I want to use it like Admin, I assigned the role of Admin.

Image-5

I try to open an InPrivate browser, paste the address of the environment, and login with my user.

Image-6

I entered the environment without any problems. Since I logged in from a different environment, a few security steps were required, but it didn’t cause any problems.

Image-7

In this article, I tried to explain how to add users to different environments of Dynamics 365. Security and user management is very important. Many details are available and I plan to mention them in the following articles.

Regards.

www.fatihdemirci.net

TAGs: Microsoft Life Cycle Services, LCS, Azure, Azure DevOps, Import User, Microsoft Dynamics 365, MsDyn365FO, MsDyn365CE, MsDyn365, Dynamics 365 Insights Power BI, Power Automate, Power Apps, Power Virtual Agents, what is Dynamics 365, Dynamics 365 ERP, Dynamics 365 CRM

Page 1 of 41234