Posts

Showing posts from June, 2016

Enterprise portal installation error : The Application Pool or Managed Metadata Web Service may not have been started

Image
Some times during the Enterprise portal installation the setup fails due to following issue :   ERROR    The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator Resolution 1 Make sure the managed metadata service is already started or not. Go to SharePoint Central Administration site -> Application Management ->  Manage Services on server -> Managed meta data ->Start. NOTE: After start the Service once reset the iis by running Command prompt as admin and execute command "IISRESET". Resolution 2 We have to give the "Permission" Go SharePoint Central Administration site -> Application Management -> Service Application -> Manage Service Application. Highlight the Managed Metadata Service that your web application is associated with. (Do not click on the link, just click somewhere else o

TFS Error: The file file.xpo was not correctly imported to the model store in a previous synchronization. Any updates of the file is blocked from AX. Open Version Control, Synchronization log to re-import the file.

While working on TFS with Dynamics AX 2012, sometimes I get the following error when I try to check-out a certain file. This error occure because either you had synchronized your work space with the files that were not in consistent state or you had checked-in your files which had some errors in .xpo code, like a node was missing etc.  The complete error message is as follows:   The file ****.xpo was not correctly imported to the model store in a previous synchronization. Any updates of the file is blocked from AX. Open Version Control, Synchronization log to re-import the file.  To fix this error, open visual studio, go to Team Explorer (Menus-> View-> Team Explorer), and connect to your project with the TFS. After connecting to the project, just locate the file that you want to check out. Right click the file, and click " Check out for Edit ".   Now go back to AOT, right click on that file, and click " Undo Check-out ". Now you can check this file

Shrink the Dynamics AX Database Log Files

The Database log(.ldf) can be shrunk to recover some of the disk space on the DB server. Just ensure you have appropriate backups of the data file(.mdf) The command can be executed when the database recovery option is set to Simple. The recovery option can be found under Database Properties > Options > Recovery Model Just be careful these settings should not be changed in the production without consulting DBA as it will affect the recovery time in case of a crash. More appropriate to do it on Test or Development machines to catch up on disk space. Use <DatabaseName> GO DBCC SHRINKFILE(<Database_Log>,100) GO The first parameter is the logical name for the DB log, which can be found from the Database Properties > Files > Logical Name Column. The second parameter is for size in MB to be set

SQL Query to Insert records in Table from one SQL Server instance to another

Before proceeding with the insert logic make sure following points: 1. Make sure that the target SQL Server is added in sys.servers through SQL Query :           select * from sys.servers 2. if the target SQL Server is not in sys.servers you can add it by using sp_addlinkedserver stored procedure, Such as sp_addlinkedserver '<SEREVR NAME>' Execute the following SQL Query:  INSERT INTO dbo.[TableName]    SELECT *    FROM [ServerNAme].[DataBaseName].dbo.[TableName] SIMILAR SCENARIO CAN BE USED FOR UPDATE AS BELOW: update dbo.SalesTable  set custAccount = ST2.CustAccount  from dbo.SalesTable ST1  inner join [ServerNAme].[DataBaseName].dbo.SalesTable ST2  on ST1.SalesID= ST2.SalesId

Customers import in AX 2012 from Excel JOB

static void CustomerMapping(Args _args) {     SysExcelApplication application;     SysExcelWorkbooks workbooks;     SysExcelWorkbook workbook;     SysExcelWorksheets worksheets;     SysExcelWorksheet worksheet;     SysExcelCells cells;     COMVariantType type;     int row = 1;       #define.Filename('C:\\FileName.xlsx')     CustTable custTable;     CustInvoiceAddress  invoiceAddress;     DirPartyTable dirPartyTable;     LogisticsElectronicAddress logisticsElectronicAddress;     DirPartyLocation    dirPartyLocation;     DirParty dirParty ;     DirPartyContactInfoView dirPartyContactInfoView;       application = SysExcelApplication::construct();     workbooks = application.workbooks();     try     {         workbooks.open(#Filename);     }     catch (Exception::Error)     {         throw error("File not found");     }     workbook = workbooks.item(1);     worksheets = workbook.worksheets();     worksheet = worksheets.itemFromNum(1);//ite

Dynamics AX : Get the file name from the File Path using X++

AX has a standard method in the Global Class to split the file name from the entire file path.The method is fileNameSplit().The method takes filepath as the parameter.It splits the filepath into three different strings filepath,filename,fileextension respectively.The usage of the function can be seen below. Filename filepath;  Filename filename;  Filename fileType;  str fileNameString; ; [filepath, filename, fileType] = fileNameSplit(fileNamePath);  fileNameString= filename + fileType;  Now the fileNameString will return you the filename with extension.