ax / d365fo – Adding Barcode to a Report

First, create a method like the following either on your Report element or in the relevant Section. display str 30 barcodeRefNum() {     Barcode     barcode;     ;     barcode = Barcode::construct(BarcodeType::Code128);     barcode.string(true, custPackingSlipJour.packingSlipId);     return barcode.barcodeStr(); } Note the BarcodeType enumeration that provide you with options other than 128. Then, add a String control … Continue reading ax / d365fo – Adding Barcode to a Report

AX / D365FO – How to : “The class or interface does not exist ax”

Are trying to use a class that belongs to another model and you face this error : "The class or interface .... does not exist" Don't worry this happens because you forgot to reference the model in your custom model. To solve the issue follow these steps : Go to Dynamics 365 > Model management … Continue reading AX / D365FO – How to : “The class or interface does not exist ax”

SQL Server – Row Count for all Tables in a Database

Are you loiking for a SQL SERVER query that gives you an overview of how many row has every single database table? Look a this SELECT QUOTENAME(SCHEMA_NAME(sOBJ.schema_id)) + '.' + QUOTENAME(sOBJ.name) AS [TableName] , SUM(sPTN.Rows) AS [RowCount] FROM sys.objects AS sOBJ INNER JOIN sys.partitions AS sPTN ON sOBJ.object_id = sPTN.object_id WHERE sOBJ.type = 'U' AND … Continue reading SQL Server – Row Count for all Tables in a Database

SQL SERVER – Automatically Defrag indexes based on a given fragmentation percent

This script performs a reorganization of the indexes of the tables that have a percentage of fragmentation greater than a number that you can decide DECLARE @sqlCommand nvarchar(max) SELECT @sqlCommand = string_agg( CONVERT(NVARCHAR(max) ,'ALTER INDEX ALL ON ' + T.name + ' REORGANIZE'), ';' ) FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS DDIPS INNER … Continue reading SQL SERVER – Automatically Defrag indexes based on a given fragmentation percent