It’s been a while since I posted a blog post. I have been extremely busy and had barely time to sit down and finish some posts. During my work I collected some experiences and made some drafts, so I will be publishing some more blog posts, for sure. One of the things that took some time from me was testing platform update 11 before it could be released. This platform update was released October 6, 2017 and mainly has some technical improvements. The majority is related to support more options for extending the application to prevent overlayering. One new item is a functional improvement: a Document count indicator.
In the earlier days of Microsoft Dynamics AX, there was a small indication if a record did contain attachments (notes, files, etcetera). The document button was highlighted or was a bit sunken. This pattern didn’t fit in the user experience of Dynamics 365 and was not implemented. Now in the latest platform update 11 there is a new document count indicator which will show you the presence of documents.
When you now open e.g. the vendor list page, per record, you can see the number of documents attached to it.
The count of document is a good addition, in my opinion. Now you can see if there are attachments, but also the number. Somehow, this experience makes me think of a web shop basket :). When adding a new attachment, this count will increase accordingly, showing then a new count:
When there are over 9 documents, the count will show only’ 9+’ as e.g. ‘325’ would consume too much space. Of course it makes sense, but hovering the button will still show ‘9+’ where there is space enough to display the real count. Personally, I do think the real count would give more value to this feature. For now, I’m confident this feature will satisfy the need from many customers.
When you want to learn more about platform update 11, you can visit the page What’s new or changed in Dynamics 365 for Finance and Operations, Enterprise edition platform update 11 (October 2017).
That’s all for now. Till next time!
Microsoft Dynamics AX CommunitySubscribe to this blogger RSS FeedMy book on Merging global address book records in AX 2012
The post New document count indicator in platform update 11 appeared first on Kaya Consulting.
When using Microsoft Dynamics 365 for Operations you can create new security roles or even customize existing ones. When you do so, you have to be careful if everything is working like intended. This blog post will tell you about the enhanced worker information and how to grant access to this.
When working in the application, some fields contains a name of the worker. To be able to select the correct worker, there is a neat lookup form, showing some additional information. Also, when you hover over the name field, a preview form with a picture and contact details will be shown. These forms are illustrated in the next screenshots.
As you can see, there is no standard lookup with just a number and name, but it almost looks like the preview of Skype for Business. When configured correctly, also the presence indicator will show you if the person is available for chats.
When you create a custom role, the lookup and preview form might not work due to not sufficient permissions. I will show an example what might go wrong. For this example, I created a new security role with only two duties. The Purchasing assistant would be allowed to maintain purchase orders and view information about vendors.
This role is assigned to a user and will behave in the next (wrong) way.
Initially the lookup is throwing an error. A second attempt will again raise the error and shows an empty lookup form. The tooltip is not showing the enhanced form, but only repeats the worker name. So now I’m disappointed and would like to have a solution for this as I’m aware of the nice preview and lookup capabilities.
I did explore the application and Visual Studio how this information has been secured. It appears to be part of the Employee security role out of the box. If you don’t want to assign the complete role, you can also add the duty View basic information about workers in the system into your security role. Also, other roles like Account payable clerk, Manager, Human resource manager do have this duty included. I assume you don’t want to add for example the Recruiter role to have the enhanced information available.
This fixes the lookup in all cases. However, you should keep in mind that the neat preview isn’t always working. It is only working when the user also has access to the Worker detail form. There is some weird behavior on the tooltip functionality in combination with clickable fields which will open the details. So it seems like it first checks the access on the Worker details form and forgets about the tooltip preview. In my test I did add the menu item in a separate privilege. In this way there is no access on the standard worker list pages.
It would be possible to create a privilege with the menu item HCMworker and grant read access only. In that scenario a user would have access to the worker details with the next information. This user has no access to private information, so private addresses and contact details are not visible. The details form is then filtered on one worker only.
There might be reasons why you don’t want to grant access to the worker details. In that case, currently the preview tooltip will not work. Considerations are:
The post Don’t forget the enhanced worker information appeared first on Kaya Consulting.
Recently we had a challenge to read uncommitted data from the Dynamics 365 for Operations database. Usually this is not required as you may retrieve dirty data. When using a business application, you should rely on correct and committed data as otherwise reporting might provide you incorrect data. However, if you find a very good reason to change the isolation level temporary, this post will guide you how to achieve this.
First of all, I’m not a technical database specialist. Thanks to several troubleshooting on performance and finding gains in Microsoft Dynamics AX (and in my previous life, also NAV), I learned something about locking and data isolation. A recommended read would be the documentation from Microsoft: Isolation Levels in the Database Engine and Understanding Isolation Levels.
It is measured that the Microsoft Dynamics AX database performs the best using the option READ_COMMITTED_SNAPSHOT. You can read more about this on the next page: Configuring the Microsoft Dynamics AX business database.
When you want to run a report while other users are attempting to insert and update records, you must ensure that data will be consistent. E.g. when updating a packing slip, first the sales order lines are being updated; then the sales order header. In opposite when you run a report, the header is retrieved first; then the lines. If you first print the header as still being an open order, you don’t want to have the lines already updated with the status and remaining quantities. For this reason, data which will be updated (header and lines) will be isolated until the transaction is complete.
Sometimes, you want to read data which has not been committed yet. A reason would be having a look at intermediate data when performing larger insert or update sets. As mentioned before, the downside is that there are risks of reading dirty data.
When we had an on-premise SQL server, it is possible to use statements to set connection properties in X++ or C# coding. As we have to deal with an Azure SQL server database, we cannot use this. Also, I understood that select statements containing the keyword WITH NOLOCK is not supported on Azure SQL databases. The only option to read uncommitted data seems to be using a statement like:
set transaction isolation level READ UNCOMMITTED
select * from myTable
But then the 64-million-dollar question: How can we do this using X++ statements? And moreover: How to translate an advanced query object containing multiple data sources and ranges with wildcards?
Continue reading for your answer…
To execute a simple SQL statement, you can use the next coding for reading uncommitted data:
str sqlStatement = 'set transaction isolation level READ UNCOMMITTED\n'
+ 'SELECT * FROM MYTABLE';
UserConnection connection = new UserConnection();
Statement statement = connection.createStatement();
resSet = statement.executeQuery(sqlStatement);
The result set (resSet) contains the data retrieved from the database. You have to extend the coding to read the data from the result set. An example is provided below. Note that you are executing the command directly. When you need to retrieve data from a single company, you have to specify the filter with a WHERE clause yourself.
Suppose you have a (packed) query object which contains multiple data sources and some more advanced queries. For example, a query with customers from several regions and a date range between January 1 and April 30. On forehand, you don’t know the number of data sources and query ranges. Good to know, there is one x++ statement getSQLStatement() which will do the correct translation for you. This method has been introduced in Microsoft Dynamics AX 2012 R2. This method is used by the Data Import Export Framework which also needs to get the statement and alter it for some reasons.
If you use this statement, it will convert a query to an SQL statement, initially using parameters for the range values such as the DataAreaId. For this reason, also the parameters needs to be converted to literal range values. Now, given some complexity, use the next X++ statements to perform the SQL statement with reading uncommitted data:
str sqlUncommitted = 'set transaction isolation level READ UNCOMMITTED';
UserConnection connection = new UserConnection();
Statement statement = connection.createStatement();
// Assume the _queryRun variable was received as method parameter
// First set the query to send literal values instead of parameters
sqlQuery = _queryRun.query().getSQLStatement();
sqlStatement = strFmt('%1\n%2', sqlUncommitted, sqlQuery);
resSet = statement.executeQuery(sqlStatement);
// Loop and read the result set
// If the indexes in the resSet variable match the column indexes, use the next statements
RecId recId = resSet.getInt64(1);
GroupId groupId = resultSet.getString(2);
Description description = resultSet.getString(3);
This is one example how to read the data. It is also possible to make this more flexible by using the ResultSetMetaData class. Using this class, you can find out the number of columns and find column names to convert the values in your own variables.
I like to conclude my post with some warnings and notes for consideration.
The post How to: Read uncommitted records using Dynamics 365 for Operations appeared first on Kaya Consulting.
In the past, I had written two blog posts about personalizations in Microsoft Dynamics 365 for Operations (at that time still called Dynamics AX). Some features are already enhanced and expanded in the past year. With the release of Platform update 5, Microsoft added the option to centrally upload a saved personalization file to multiple users at once. Before this update, each user had to import a smart personalization done by a user manually. In this post, I will guide you through the new options.
As the personalization options have been evolved since I wrote the previous blog posts about personalization, I will show a small example to personalize a form. The Teams form will be taken as example. When you open the standard form, it looks like this:
We would like to include the Description in the list and also rename the Administrator field to Primary contact. As last change, I thought it would be a good idea to have the primary contact in the fast tab summary. You can see the result below.
We are very happy with this result. By the way: Did you know it was possible to include more fields in the overview list?
Now we would like to use this as a default for multiple users. To be able to distribute these personalizations, we have to export the changes to a file first. You can do it using the Manage drop down button and click Export. Then you can download the file with the form personalization.
Once you got the personalization file, the system administrator can distribute it to one, more or all users at once. To do so, you need to go to the menu path: System administration > Setup > Personalization.
On the form that opens, you have to perform 4 steps.
When the import is complete, the other users can directly benefit from the new enhanced lay-out.
Using the main Personalization form, a system administrator would be able to delete all personalizations for all users with one action.
Another feature is removing individual personalizations from several users. Support for this can be found on the tab page Clear. You can select a form or workspace name. If the list with users is too large, you can filter users by role or using filter options on the User list. Then you can select one, multiple or all users and click the Clear button. Note that there is no support to delete personalizations from multiple forms together, unless you want to remove all personalizations as described above.
To prevent users from making personalizations, even restrict it per form, you can use the features available on the Users tab page.
The post Manage personalizations in Dynamics 365 for multiple users appeared first on Kaya Consulting.
However I’m currently extremely busy on several projects and also preparing some speaker sessions for a local Dynamics community and also the Summit EMEA 2017, I would like to share a solution to solve an authentication error when using the Microsoft Office Add-in. You will probably not face this issue when you are using machines in your own domain.
Using my own laptop accessing a test environment of a customer I wanted to Open the customers in Excel. In Dynamics 365 for Operations you can click the Office button to Export data or Open data in Excel. What is the difference between Export and Open here? Well, Export will create an Excel file with static data where Open will create an Excel file with embedded Office add-on to be able to refresh and also publish data back to Dynamics 365.
During login an Authentication error occurs for me when accessing this customer sandbox environment from my work laptop.
Looking at some error details the next error is raised:
AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user’s session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE security zone than the Azure AD endpoint (login.microsoftonline.com). Trace ID: ae185b5c-b397-4b49-b3d1-790e1c9a67aa Correlation ID: 04007e36-a31d-4968-92c5-3fe70bfa5f59
In simple words: My laptop is not part of the domain of the customer. When trying to login, you will then continuously notice the attempts fails. Again and again and again…
When you click the User menu, you will get a menu with the option to Sign out.
When you sign out, the next form will then be presented. Usually you will close a browser, but in this case, the login page is embedded in the Excel add-on. The User menu is not visible and at first sight, there is no option to continue. So we are a bit confused now…
When you click the form space a small menu icon will be presented which can be used to open a Microsoft Dynamics menu. Then click Reload. You can also right click on the white space to get a pop-up menu with the option for reloading the page. The step to really sign out can be avoided. If you are able to open the Microsoft Dynamics menu, you just have to Reload the page to get rid of the silent sign-in attempt.
When the page is reloaded, you can sign-in with the required login credentials.
When you have provided the correct credentials, you can continue using the Excel add-on.
Microsoft Dynamics AX CommunitySubscribe to this blogger RSS FeedMy book on Merging global address book records in AX 2012 [/custom_button
The post How to solve Microsoft Office Add-in authentication error in Dynamics 365 for Operations appeared first on Kaya Consulting.