SQL SERVER – Convert a given date from UTC to your time zone and daylight savings time

Let's say you have a datetime value that you know is encoded in UTC (if you don't know what timezone your data was originally encoded in you're out of luck) If you want to convert the UTC datetime to Eastern Standard Time calculating the right daylight saving time, you can use on AT TIME ZONE 'UTC' and then … Continue reading SQL SERVER – Convert a given date from UTC to your time zone and daylight savings time

SQL SERVER – Copy more than 65535 characters from result grid Column

When you copy value from Result grid, data will be retrieved as per your Query options setting in SSMS ( Query -> Query Options -> Results -> Grid -> Max characters retrieved) Default characters value is 65535 and data copied from result grid is only of length 65535  If you want to increase maximum number … Continue reading SQL SERVER – Copy more than 65535 characters from result grid Column

AX / D365FO – Change the text colour of a Form field using X++

This example shows how to change the text colour of a Form control through X++ code. The color will be changed in RED TextControl.colorScheme(FormColorScheme::RGB); TextControl.foregroundColor(WinAPI::RGB2int(255,0,0)); And this will be the result If you want to convert to GREEN just modify like shown below TextControl.colorScheme(FormColorScheme::RGB); TextControl.foregroundColor(WinAPI::RGB2int(0,128,0));

AX / D365FO – How to change font size of control labels in D365 forms

Actually, the only way I found to increase Font Size of a Form Static text is to change the Style Property value of the control By default the property is set to Auto and the text appears in a normal size (like shown below) But I wanto to increase the size so I changed the … Continue reading AX / D365FO – How to change font size of control labels in D365 forms

AX / D365FO – Adding ConfigId in SALESLINE using X++

Code below shows the proper way of adding SalesLine with ConfigId SalesLine salesLine; InventDim inventDim; SalesId salesId = '100001' ItemId itemId = 'ITM1001'; ConfigId configId = 'CFG1001'; salesLine.initValue(); /* Init SalesLine from SalesTable*/ salesLine.SalesId = salesId; salesLine.initFromSalesTable(salesTable); /* End*/ /* Set SalesLine Item*/ salesLine.ItemId = itemId; /* End*/ /* Set Retail Variant Id*/ inventDim.configId = … Continue reading AX / D365FO – Adding ConfigId in SALESLINE using X++