An attempt to communicate with Azure DevOps failed because a token could not be retrieved,Please re-enter your credentials

After upgrading to Visual Studio 2019 Version 16.11.14, I began to experience the following issue: “An attempt to communicate with Azure DevOps failed because a token could not be retrieved,” says Team Explorer.

I click the link to re-enter my credentials and am able to log in properly, but Team Explorer continues to display the message, and re-entering credentials only helps for that session. The same notification appears the very next time I opened VS2019.

This began after I upgraded to version 16.11.14. I’ve restarted my computer as well, but the problem continues.

I attempted to clean the cache in Visual Studio, but it was ineffective.

Solution: It worked after closing all instances of Visual Studio and deleting the folder “%LOCALAPPDATA%\.IdentityService” and I was able to log in and reconnect.

Happy Daxing 🙂

How to search in D365 F&O Via Metadata Search

The visual studio provides capability to find the code or objects properties(Table, Forms, Data entity) that meets the certain criteria.

For example, you wants to find a modifiedfield method which is written in any class which is written by using chain of command in D365.By using the Metadata search, you can easily find list of example available in D365.

The metadata search is available in Visual studio menu Dynamics D365

It will open an metadata search form where you can search using the filters options to get the desired results. You can get help about using filter and filter syntax by opening the drop-down menu available in the search box.

Metadata search filter button

  • code: – search for a specific code.
  • type: – filter the elements by type.
  • model: – filter the elements by model.
  • name: – filter the elements by name.
  • property: search for element with the property with the specific value.

I have written few examples which i have used during my search requirements.

Find method in Table
type:table,method name:insert

Find method in Data entity
type:dataentityview,method name:postTargetProcess
code:”NumberSeq” Type:DataEntityView

Find method name which belong to Test model in a class
type:class,method name:modifiedField Model:Test

Find keyword used in the method of any class
code:”onValidatedField” Type:Class

Find table property
type:table,table property:”tableGroup=Main”
type:table,table property:”tableGroup=Parameter”

Find form control property with in form
type:formcontrol property:type=ReferenceGroup
type:form property:formtemplate=DetailPage

Find Table Relation
type:table,tableRelation name:LogisticsLocation_FK
type:table,tableRelation name:PostalAddress_FK

Happy Daxing 🙂

Reference: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/metadata-search-visual-studio

Remove hexadecimal special character &#xA (new line) from a string

Nowadays I am working with a Logic app where I need to process composite data entity XML output to flat file output.

I have been wrestling with various issues while working with Biz talk transformation mapping where I have found an issue related to Address fields in D365 F&O data entity XML output whereas it contains special characters such as Newline, carriage return, etc.

The hexadecimal value “&#xA” is an HTML Encoded Line Feed character. It is the equivalent to \n -> LF (Line Feed).

The interesting part is when you open XML file then XML editor/Internet explorer does not show you the the hexadecimal value “&#xA” and hexadecimal value was adding extra lines in flat file output with new lines and carriage returns.

There are simple solution to solve this issue, Below is a very simple trick to remove the special character from any string .

X++:

Scripting functoid.

Happy Daxing. 🙂

Your license has gone stale and must be updated. Check for an updated license to continue using this product. – Visual Studio 2015

Today morning when I launched visual studio 2015 I get the dialog box saying ‘your license has gone stale and must be updated. Check for an updated license to continue using this product.

Though I have valid MSDN’s subscription and I tried to sign out and sign in again but error was continuously persist.

After lots of struggle I found solution of the issue by following below steps and validated myself for VS 2015

Log in to the link: https://my.visualstudio.com/ProductKeys with visual studio subscription credentials.
Search for Visual Studio Professional 2015, Claim the license and copy it
Click on “Unlock with a Product Key” and apply the license.
That’s it. License validation successful.

D365 Error: Document handling is inactive for this user (view options)

I created a sales order and was trying to attach document notes corresponding to sales order header then I started getting error “Document handling is inactive for this user (view options)” Here you can solve this error by enabling an option of document management setup On the Options page (Settings > User options), on the Preferences tab, you can use the Enable […]

No print management settings are applicable so no document is produced.

I tried to print from  Account Receivable  >All Customers > Collect>Customer Balances>Statement

Then I started getting below error: Customer account: 10C00001 No print management settings are applicable so no document is produced.

Print management Settin

This error occurs when the environment has not been configured before, this can come upon any report those are extended with print management framework.

All the Print Management reports related to a particular module are found on one common form for that module but the navigation to these forms is not the same across the modules and the users often face difficulties finding the Print Management settings of specific reports.

You can find Print Management setting on below navigation’s to find your report

Module Navigation
Accounts payable/Procurement and sourcing Accounts payable > Setup > Forms > Form setup > General tab > Print management button
Accounts receivable Accounts receivable > Setup > Forms > Form setup > General tab > Print management button
Inventory management Inventory management > Setup > Inventory and warehouse management parameters > Print management tab > Print management button
Project management and accounting Project management and accounting > Setup > Forms > Form setup > General tab > Print management button
Transportation management Transportation management > Setup > Transportation management parameters>> Print management >  Print management button
Warehouse management Warehouse management > Setup > Warehouse management parameters > Print management > Print management button

Now select your report and right-click

Print management setting

Here you can set your report name and it will automatically save the record.

Print management setting 3

You are good to go now.

Happy Daxing 🙂

Acceptance Test Library-Automated Testing in Dynamics 365 For Operations(Series-1)

Hello Everyone,I started working on ATL for our ISV solution,The Acceptance Test Library  is made publicly available with 10.0.2.

One month back,when I started working on it, I had many questions in my mind about Acceptance Test Library(ATL).Why we need ATL and its for D365 Finance & Operations. Here I am posting few answers of the questions those came up in my mind when i started development with ATL.

Why ATL?

The Partners keep releasing their ISV Solutions to meet the concept of Dynamics 365 Finance and Operations #OneVersion and must have an ability to update their application frequently and test the solution in days and hours (not months and weeks).So automated testing play a important role in Dynamics 365 Finance and Operations.

Even Microsoft released another tool for regression testing RSAT(Regression Suite Automation Tool) is already playing decent role to perform the testing activities, But it definitely does not place most organizations in a position to have 100% coverage for all business and technical scenarios.

Here comes ATL . ATL is indented to be used by developers to ensure the implementations is as expected. its not indented for SIT or UAT. For those you need RSAT

Here comes ATL .

What is ATL framework

ATL is indented to be used by developers to ensure the implementations is as expected. its not indented for SIT or UAT. For those you need RSAT.

it is a library of around 5000 classes that makes it really simple to author quality X++ tests. The Acceptance Test Library is made publicly available with 10.0.2,ATL framework – available with the 10.0.3 update(PU27) and ATL wizard – available with the 10.0.4 update(PU28)

ATL and Unit Test Framework are orthogonal where ATL is class library, making authoring of test easier and SysTest is still the execution engine for tests that uses the Acceptance Test Library.

The ATL framework is a powerful idea where acceptance tests are created when the requirements are analyzed and developers implement the system using the acceptance tests before the production coding begins.d

Microsoft provided few sample tests which covers almost all modules and found few classes which are under development while preview release of 10.0.5(PU29)

Benefits of ATL framework

  • This is very simple same as for any Unit Test. Just create a class extending SysTestCase and add public methods with [SysTestMethod] attribute.
  • Standardized and uniformed approach for addressing:
  1.  Test data setup – for individual test case or test class
  2. Test data suite setup – for a feature or a set of common test classes
  3. Test validation
  4. Test querying needs
  • It is so powerful, one-time creation efforts to writing test helps developers to repro a bug and features instead of going through the UI.
  • Its very easy to change the Tests with minimal efforts with product change.
  • ATL test cases can be be part of scheduled build through Azure Dev ops.
  • It is also supporting “run as user” of SysTestFramework.
  • The test is repeatable, debuggable and prevents regressions, whereas manual navigation of the UI is time wasted.
  • ATL specifications have built-in validation mechanism with consistent failure messaging.
  • it is precise. One line to add on-hand for an item, one line to create a sales order, etc. That is because the ATL API is fluent.
  • If you write these examples using ATL, then you can run the examples as tests, and if they pass you know the system behaves according to specification. No more stale documentation or manual test required.
  • The development efforts are not much due to re-usability of X++ objects.

I will keep posting my ATL technical experience and how to start the development with ATL in next posts.

Error: ‘createLogger’ contained in the non-public class ‘SalesInstrumentationLogger’ is inaccessible

 I was trying to replicate this standard data entity SalesOrderHeaderV2Entity but when I have done replicated it. It appeared three errors:


The above started coming due to Class SalesInstrumentationLogger is marked as internal so you can’t use it from your own custom objects (such as entities).

The Simplest solution is you need to delete logic or method where you have internal objects as SalesInstrumentationLogger or setReportingCurrencyFixedExchangeRate.

Port conflict with existing application- D365 Data entity Import/Export Error Unable to start Azure Table Storage

As I posted in previous post, I was getting issue of Azure table storage services while D365 import/ export data through data entity.

Whenever I was facing the above issue then i used to run the BAT file command in previous post  D365 Data entity Import/Export Error Unable to connect to the remote server’ Error with Azure Table Storage.

 

Suddenly i started getting an error of Port conflict with existing application while starting the services of Azure table storage.

Microsoft Azure Tools: Failed to initialize Microsoft Azure storage emulator. Port conflict with existing application.

By default, Azure storage emulator is using port number 10000, 10001, 10002 for Blob, Queue and Table services respectively.

If you have existing applications using these port numbers and can’t be changed, you can resolve the port conflict by changing Azure storage emulator default port numbers to avoid port conflict as the steps below:

  1. Stop your Azure storage emulator service
  2. Go to your storage emulator default installation folder, which is located at C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator
  3. Open the AzureStorageEmulator.exe.config file for edit
  4. Edit the default port numbers as shown below enter image description here
  5. Start your Azure storage emulator service.

You should expect the Azure storage emulator to start successfully without any port conflict.

Happy Daxing. 🙂