To enable the "capture screenshots" function in the D365 task recorder, you have to use Chrome and install the “D365 for Finance and Operations Task Recorder” Chrome plugin.
This unfortunately is not yet mentioned at all in the Dynamics 365 for Finance and Operations documentation.
Technical things that I learnt today on Microsoft Dynamics AX and surrounding technologies.
Wednesday, December 20, 2017
Wednesday, December 13, 2017
How to increase ItemId size in D365
You will need to increase the length of ItemIdBase and EcoResProductNumber data types.
EcoResProductNumber data type is used in one of the staging table for a data entity.
EcoResProductNumber data type is used in one of the staging table for a data entity.
Friday, November 3, 2017
How to add a new operating unit type
For AX2012, you can follow the steps in this link https://msdn.microsoft.com/en-us/library/gg989762.aspx
Couple of important points:
Couple of important points:
- The new enum value must use the immediate next number for that enum (you should not skip any number)
- The new enum name drives the view name that you need to create. AX will look for a view with "DimAttribute" prefix after the enumeration name.
For example, if the new enum name is OMBranch then the view name must be DimAttributeOMBranch.
For D365, it is quite similar to the steps in AX2012, however in the view it should have a method called registerDimensionEnabledTypeIdentifier and you should use the view name that you just created. This will then add the new operating unit as a dimension type.
Keep in mind that in D365, there are 3 additional operating unit types (branch, rental location, region) that are part of the Fleet Management model, which is actually a sample model and doesn't get installed by default to tier 2 or production environments.
Keep in mind that in D365, there are 3 additional operating unit types (branch, rental location, region) that are part of the Fleet Management model, which is actually a sample model and doesn't get installed by default to tier 2 or production environments.
Wednesday, November 1, 2017
Management Reporter scripts
Few scripts that can be used to check the MR integration tasks:
Check all integration tasks that have been executed:
--List details about each DDM task: state, progress, last...
--List details about each DDM task: state, progress, last/next runtime in local time, and the interval that each runs
--Status 5=Success; 3=Running; 6=Cancelled
select CIG.[Description]
, STK.[Name]
, STS.[Progress]
, CASE STS.[StateType]
WHEN 3 THEN 'Processing'
WHEN 5 THEN 'Complete'
WHEN 7 THEN 'Error'
END AS StateType
, DATEADD(minute, DATEDIFF(minute,GETUTCDATE(),GETDATE()), STS.[LastRunTime]) as LocalLastRunTime
, DATEADD(minute, DATEDIFF(minute,GETUTCDATE(),GETDATE()), STS.[NextRunTime]) as LocalNextRunTime
, CM.[ContinueOnRecordError]
, STRG.[Interval]
, CASE STRG.[UnitOfMeasure]
WHEN 2 THEN 'Minutes'
ELSE 'Seconds'
END AS IntervalTiming
, CASE STRG.[IsEnabled]
WHEN 1 THEN 'Enabled'
ELSE 'Disabled'
END AS NameStatus
from [Connector].[Map] CM with (nolock)
inner join [Scheduling].[Task] STK with (nolock) on STK.[Id] = CM.[MapId]
inner join [Scheduling].[TaskState] STS with (nolock) on STK.[Id] = STS.[TaskId]
inner join [Connector].[IntegrationGroup] CIG with (nolock) on CIG.[IntegrationId] = STK.[CategoryId]
inner join [Scheduling].[Trigger] STRG with (nolock) on STK.[TriggerId] = STRG.[Id]
order by CIG.[Description], STK.[Name]
Check the tasks outcomes
select CIG.[Description], ST.[Name], SM.[Text],
DATEADD(minute, DATEDIFF(minute,GETUTCDATE(),GETDATE()), SL.[StartTime]) as LocalStartTime,
DATEADD(minute, DATEDIFF(minute,GETUTCDATE(),GETDATE()), SL.[EndTime]) as LocalEndTime,
SL.[TotalRetryNumber], SL.[IsFailed], STT.[Name] as TaskType
from [Scheduling].[Log] SL with (nolock)
inner join [Scheduling].[Task] ST with (nolock) on SL.TaskId = ST.Id
inner join [Scheduling].[Message] SM with (nolock) on SL.Id = SM.LogId
inner join [Scheduling].[TaskType] STT with (nolock) on ST.TypeId = STT.Id
inner join [Connector].[IntegrationGroup] CIG with (nolock) on CIG.[IntegrationId] = ST.[CategoryId]
order by SL.[StartTime] desc
Check the current integration activities
SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
Sunday, October 8, 2017
How to get the field type/size and mandatory fields out of data management import/export project
Whenever we do data migration tasks, there always a need to know the field type/size out of the data entities that will be used, and also to identify which fields are the mandatory ones. Unfortunately in Dynamics 365 for Operation, there is no easy way to get this information from the data management workspace.
I found out that there are "legacy" DMF forms from AX2012 that were upgraded to Dynamics 365 for Operation, however they are not exposed through menus or buttons. These particular forms contain the entity "attributes" and here are the steps to access the forms:
I found out that there are "legacy" DMF forms from AX2012 that were upgraded to Dynamics 365 for Operation, however they are not exposed through menus or buttons. These particular forms contain the entity "attributes" and here are the steps to access the forms:
- Open D365O and in the url, replace the mi value to DMFDefinitionGroup
Usually when you first open D365O, the url will be like
https://<axurl>/?cmp=USMF&mi=DefaultDashboard
This needs to be changed into
https://<axurl>/?cmp=USMF&mi=DMFDefinitionGroup - It will then show a form where you can select the import/export project (or back in AX2012 it was called DMF definition group). Select the record and click the "Entities" button
- Highlight one of the data entities in the project, and click the "Entity attributes" button
- You will then see a form that displays all the entity fields, and shows the field type and size, as well indicate which fields are mandatory

Friday, September 29, 2017
How to do simultaneous request calls using Postman collections
Newman is a command line collection runner for Postman. It allows you to run and test a Postman Collection directly from the command line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems.
With Newman and Async, you can do simultaneous request calls which will be very helpful for performance tests.
Here are what you'll need to do to get it working:
With Newman and Async, you can do simultaneous request calls which will be very helpful for performance tests.
Here are what you'll need to do to get it working:
- Install Newman by following the instructions on http://blog.getpostman.com/2015/04/09/installing-newman-on-windows/
In my case, I didn’t have to install Python to get it working. - Create/use a folder for the tests
- Export a Postman collection into a file

- Export a Postman environment that you want to invoke the calls to

- Open a command prompt in administrator mode on the folder from step 2
- Install async module by typing npm install --save async
- Create a .js file
- Run the .js file from step 7 from command prompt node fileName.js
var path = require('path'),
async = require('async'), //https://www.npmjs.com/package/async
newman = require('newman'),
parametersForTestRun = {
collection: path.join(__dirname, 'postman_collection.json'), // your collection
environment: path.join(__dirname, 'postman_environment.json'), //your env
};
parallelCollectionRun = function(done) {
newman.run(parametersForTestRun, done);
};
// Runs the Postman sample collection thrice, in parallel.
async.parallel([
parallelCollectionRun,
parallelCollectionRun,
parallelCollectionRun
],
function(err, results) {
err && console.error(err);
results.forEach(function(result) {
var failures = result.run.failures;
console.info(failures.length ? JSON.stringify(failures.failures, null, 2) :
`${result.collection.name} ran successfully.`);
});
});
Saturday, September 16, 2017
More on Postman functions
Continuing from my posts on Postman, here are some of the Postman functions that I use from time to time.
- To assign a value from the response to an environment variable:
var json = JSON.parse(responseBody);
postman.setEnvironmentVariable("bearerToken", json.access_token);
In that example, it is assigning the access_token from the response to a variable called bearerToken - Test conditions to decide the test result. This is to make it easier to see which request is failing and which one is not failing.
tests["Status OK"] = responseCode.code == 201
In this case, Status OK will be considered to be failed if the response status code is NOT 201. - Randomise an integer between certain values
_.random(1,5)
In this case, it will return any integer number between 1 and 5. - Randomise an integer value
{{$randomInt}}
In this case, it will return a random integer number. - When you create a collection of requests in Postman, you can then run them using the collection runner. By default it will go by the request order in the collection. You can use this function to direct the sequence if you need to deviate from the default order:
postman.setNextRequest("call name");
If you put call that in the "Tests" script, then after running the current call, it will then run another call named "call name".
postman.setNextRequest(null);
The above will stop the execution.
With this function you can basically call the same request more than once (for example to create multiple lines).
Please note that this function only works in the Collection Runner.
In the next post, I will explain how to use Postman collection and environment data to do multiple concurrent calls, which will be very useful for performance tests.
Subscribe to:
Posts (Atom)