Read CSV file in X++

Purpose: The purpose of this blog post is to demonstrate how to read a csv file in X++ Product: Dynamics AX 2012 Code: static void MAKReadFile(Args _args) { #File IO io; CustAccount custAccount; Email email; FilenameOpen filename = @"C:\Temp\CustomerContactInfo.csv"; Container record; ; io = new CommaTextIo(filename, #IO_Read); if (!io || io.status() != IO_Status::Ok) { throw... Continue Reading →

Create contact information in X++

Purpose: The purpose of this blog post is to demonstrate how to create contact information in X++ Product: Dynamics AX 2012 Description: The code create contact information with purpose "Collection" on the customer record. Code: static void MAKCustContactCreate(Args _args) { #define.LocationRoleName('Collection') CustTable custTable; DirPartyTable dirPartyTable; LogisticsElectronicAddress logisticsElectronicAddress; LogisticsLocationRole locationRole; Map locationRoleMap; container locationRoleCon; ; custTable... Continue Reading →

Create print management settings in X++

Purpose: The purpose of this blog post is to demonstrate how can we create print management settings in X++ Product: Dynamics AX 2012 Description: The code creates a print management settings record on a customer for collection letter note document and uses first contact of type email and purpose "Collection" found on the customer record... Continue Reading →

Filter voucher transactions by cost center

Purpose: The purpose of this blog post is to demonstrate how can we filter voucher transactions by cost center financial dimension for each user and the technical challenges behind it. Product: Dynamics 365 Finance and Operations Problem: Business requirement is that users should only view voucher transactions for their cost centers. Although we can define... Continue Reading →

AX 2012: SQL scripts to rebuild table indexes

Purpose: The purpose of this blog post is to document how can we rebuild or reorganize table indexes to improve performance of Dynamics AX 2012. Product: Dynamics AX 2012 Solution: The following script gives us index fragmentation details. Use <databasename> select s.database_id, s.index_id, b.name, s.avg_fragmentation_in_percent from sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS s inner... Continue Reading →

Generate financial report in X++

Purpose The purpose of this blog post is to demonstrate how can we generate a financial report in X++ and download it as a file. Product Dynamics 365 Finance. Description Please find the code snippet below which can be used to generate a financial report in X++. The code generates the report in XML format.... Continue Reading →

How to connect to SQL database in UAT

Product Dynamics 365 Finance Description Once you get the SQL server name from UAT environment details page on LCS, it would look like this: <SQL server name>\<Database name> Copy SQL server name and append .database.windows.net at the end so that it becomes: <SQL server name>.database.windows.net Use this string to connect to the database in SQL... Continue Reading →

How to restart IIS express on Dev

You can quickly restart IIS express on a development environment of D365 Finance from within Visual Studio. This comes handy when you're doing development instead of restarting the service from LCS. You may already know but just to document, this is how you can restart a service from LCS.

Extensible data security policy for financial reports

Purpose: The purpose of this blog post is to demonstrate how we can achieve data filtration through Extensible Data Security (XDS) policies which cannot be achieved using Role-Based Security (RBS). Product: Dynamics 365 for Finance and Operations Disclaimer: This blog post uses Microsoft’s demo company data to demonstrate the concepts and processes and hence therefore... Continue Reading →

Blog at WordPress.com.

Up ↑