SQL SERVER – Auto Generate INSERT Statements For A Table In SQL Server

To generate insert scripts for inserting data to a table on production environment or populating a test environment database follow this procedure In SQL Server Management Studio (SSMS), there is an option to easily auto generate insert statements on the fly. Below are the steps to generate insert statements using SSMS. In SSMS Object Explorer, right-click the database. … Continue reading SQL SERVER – Auto Generate INSERT Statements For A Table In SQL Server

SQL SERVER – How to increase the maximum number job history logs

By default the maximum number of logs stored in the SQL SERVER Agent history is 100 All the previous jobs stored after that value are automatically deleted If you need to store more logs in your history follow these instructions : In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand … Continue reading SQL SERVER – How to increase the maximum number job history logs

SQL SERVER – HOW TO : TEMPDB won’t shrink even if there is unused space available

It could happen that the TEMPDB grows and even if you try to shrink it the size does not decrease. The problem could be caused by cache data not being cleared. In this cases you could use some commands that clear these cached data. Read this article to understand what you can do in these … Continue reading SQL SERVER – HOW TO : TEMPDB won’t shrink even if there is unused space available

SQL SERVER – Create an Alert for TEMPDB Growing out of control

The system database TEMPDB can appear to have a life of its own. The primary purpose of this database is to temporarily store data for specific processes before being committed to a database. When a Tempdb grows out-of-control it can be a daunting task trying to figure out what is causing the growth. This can … Continue reading SQL SERVER – Create an Alert for TEMPDB Growing out of control

AX / D365FO – FIlter an AOT Query by multiple Enum types fields

Are you creating an AOT Query and want to create a filter condition by multiple ENUM types field? In the AOT query you can do it by using a data source Range object and separate value by comma In the value field property just insert the numeric or string value of the the ENUM fields. In this example I … Continue reading AX / D365FO – FIlter an AOT Query by multiple Enum types fields

AX / D365FO – Change the banner or logo for a TEST Environment

Go to Navigation pane > Modules > Organization administration > Organizations > Legal entities. In the list on the left, select the legal entity for which you want to update the banner or logo. If it is already selected, go to the next step. Expand Dashboard image tab. In the Dashboard company image type select Logo or … Continue reading AX / D365FO – Change the banner or logo for a TEST Environment

AX / D365FO – Generate an exception with an error message in X++

To generate an exception in X++ code and give a feedback to the user with an error message just use throw Error('Your error message') Here is an example boolean isOk = false; if (!isOK) { throw Error('Operation canceled'); } The code will stop after the exception and a red message will be shown to the … Continue reading AX / D365FO – Generate an exception with an error message in X++

AX / D365FO – Create a simple Note on a Table in X++

This example shows how to create a simple note on a Table (ie. SaleTable) The code will insert a new note in the salesTable Form (like shown below) Example code class CreateNote { public static void main(Args _args) { DocuRef docuRef; DocuActionArchive docuArchive; changeCompany('your company') { SalesTable salesTable = SalesTable::find("your order No."); ttsbegin; // Code … Continue reading AX / D365FO – Create a simple Note on a Table in X++