Thursday, November 18, 2010

Sunday, October 24, 2010

Query and Reset a Terminal Server Remote Session

If you want to know which users are connect to a specific Server you can use the command :

qwinsta /server:IP_SERVER

If you want to disconnect a specific user you can use the command :

rwinsta /server:IP_SERVER SESSION_ID

http://weblogs.asp.net/owscott/archive/2003/12/30/Managing-Terminal-Services-Sessions-Remotely.aspx

Tuesday, October 19, 2010

Manage SelectCtrl on Dialog Class

If you want manage the interaction with a Dialog form by a User you have to Insert this line in the Dialog Method of the Class before "Return" command.

dialog.allowUpdateOnSelectCtrl(true);

Monday, October 18, 2010

Change SID on Windows 7 and Windows Server 2008 R2 using sysprep

http://www.brajkovic.info/windows-server-2008/windows-server-2008-r2/how-to-change-sid-on-windows-7-and-windows-server-2008-r2-using-sysprep/

http://www.plexuk.co.uk/?page_id=793

How to run a Dynamics AX Hyper-V on Virtual PC

"Duplicate" a Hyper-V Virtual Macchine :

Http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/08/26/hyper-v-export-import-part-1.aspx

Convert VHD from Hyper-V to Virtual PC :

Many site said it's impossible to convert an Hyper-V VHD based image to Virtual PC 2007 format, I found a way to do it, basically you need to remove integration services before copy vhd, then replace hal.dll.

STEP BY STEP INSTRUCTIONS
1) Before copy VHD file, REMOVE Hyper-V Integration Services
2) Stop the Virtual Machine and copy the VHD file (let's call VirtualMachine1.vhd)
3) Start another virtual machine inside Virtual PC with same OS and use as a Secondary Disk the previous copied file (VirtualMachine1.vhd)
4) Using Windows Explorer from the previous started virtual machine open the Secondary Disk (let's suppose it's recognized as E:)
5) Replace hal.dll from the secondary disk (E:\WINDOWS\system32\HAL.DLL) using the file present into C: Partition.
6) Don't install ACPI drivers

More details about HAL.DLL file on: http://support.microsoft.com/kb/309283

http://vittoriop77.blogspot.com/2009/02/convert-vhd-from-hyper-v-to-virtual-pc.html

Wednesday, October 6, 2010

Dynamics AX 2009 : Troubleshoot Role Center Reporting Errors

Learn how to troubleshoot Role Center report errors. This video shows you how to find the related report and investigate an SSRS/SSAS report using Visual Studio, how to check the query in SQL Server Management Studio, and how to find the related code inside Microsoft Dynamics AX 2009.

http://msdn.microsoft.com/en-us/dynamics/ax/dd797430.aspx

Global Address Book White Paper for Microsoft Dynamics AX 2009

This paper provides information about sharing party records in the global address book across companies and within companies in Microsoft Dynamics AX 2009.

https://mbs.microsoft.com/partnersource/deployment/documentation/whitepapers/ax2009_globaladdressbook.htm?printpage=false

Monday, September 27, 2010

SharePoint 2010 Preliminary System Requirements

System requirements for SharePoint Server 2010:

1.SharePoint Server 2010 will be 64-bit only.
2.SharePoint Server 2010 will require 64-bit Windows Server 2008 or 64-bit Windows Server 2008 R2.
3.SharePoint Server 2010 will require 64-bit SQL Server 2008 or 64-bit SQL Server 2005.

http://blogs.msdn.com/b/sharepoint/archive/2009/05/11/announcing-sharepoint-server-2010-preliminary-system-requirements.aspx

Wednesday, September 15, 2010

Sharepoint : when you specify configuration database settings on the Set Configuration Database Server page of SharePoint Central Admin

http://support.microsoft.com/kb/889646

SharePoint, Failed to start the database service MSSQL$OfficeServers

Go to “regedit”, browse thru “HKLM_Local_Machine/Software/Microsoft/Shared Tools/Web Server Extensions/12.0/WSS/”.
Then change the value of attribute named “ServerRole” from SINGLESERVER to APPLICATION.

Monday, August 30, 2010

Change Font Infolog Message

If you want to change font or other properties to Infolog message Windows you have to modify the class Info method viewRefresh.

Tuesday, August 17, 2010

Impact Analysis feature for Dynamics AX 2009 (IAT - Upgrade Tool)

Patch Impact analysis, is the process of understanding a change that is being introduced into a system, determining the consequences of the change on related subsystems, and creating possible mitigation plans to reduce risk.

http://go.microsoft.com/fwlink/?LinkId=160115

Google Maps Query String Parameters

http://www.querystring.org/google-maps/google-maps-query-string-parameters

Friday, July 2, 2010

Overwrite System Field in a Table

The code below work ony at Server Side !


 
Static Server void Run()
{
    CustTable   custTable;
    ;


    ttsbegin;

    new OverwriteSystemFieldsPermission().assert();

    custTable.clear();
    custTable.AccountNum = "TEST";
    custTable.overwriteSystemfields(true);
    custTable.(fieldNum(custTable, CreatedDateTime)) = DateTimeUtil::newDateTime(01\11\2013,0);
    custTable.insert();
    
    CodeAccessPermission::revertAssert();
   
    ttscommit;
}



Enjoy !

Tuesday, June 29, 2010

How to: Register a Service Principal Name (SPN) for a Report Server - NTLM authentication - Kerberos

http://msdn.microsoft.com/en-us/library/cc281382.aspx

When Kerberos authentication is required

Kerberos is a network authentication protocol that allows Windows integrated authentication to occur across multiple computers (a client and multiple servers). NTLM authentication is an alternative to Kerberos authentication, and it is based on a challenge-response mechanism between a client and a server. NTLM authentication is easier to configure than Kerberos; however, it supports the flow of credentials between just two computers (a client and one server).
Kerberos authentication must be used in Microsoft Dynamics AX environments where: Enterprise Portal is installed on a server other than the server running Reporting Services and/or Analysis Services.
The Reporting Services database exists on a server other than the server running the Reporting Services Windows service.
If you do not configure Kerberos authentication, users will not be able to view Reporting Services reports and/or Analysis Services reports in Role Center pages.

Thursday, June 3, 2010

DataSource Query

The query object link to a DataSource have two "versions" :

1- DataSourceName.Query()... is related to the original Query
2- DataSourceName.QueryRun().Query()... is related to the LAST query, so with the range introduce by the user.

Monday, May 24, 2010

Datasource Refresh, reread, research, executeQuery - which one to use?

X++ developers seem to be having a lot of trouble with these 4 datasource methods, no matter how senior they are in AX.

http://kashperuk.blogspot.com/2010/03/tutorial-reread-refresh-research.html

Tuesday, May 11, 2010

Reboot Windows

#WinApi
WinAPI::exitWindows(#EWX_REBOOT);

Monday, May 10, 2010

SysAutoRun execRun Method

Http://msdn.microsoft.com/en-us/library/aa876533(AX.10).aspx

Refresh All Datasource inside a form

Counter i;
Common currentRecord;

;

For (i=1; i<=Element.dataSourceCount(); i++)
{
currentRecord = Element.dataSource(i).cursor().data();
// Don't lost the Filter or Range Condition
Element.dataSource(i).research();
Element.dataSource(i).refresh();
Element.dataSource(i).findRecord(currentRecord);
}

If the AX version is greater or equal AX 2009 the code become :

For (i=1; i<=Element.dataSourceCount(); i++)
{
currentRecord = Element.dataSource(i).cursor().data();
// Don't lost the Filter or Range Condition
Element.dataSource(i).research(TRUE);
Element.dataSource(i).refresh();
}

Sunday, May 9, 2010

A Visual Studio add-in to edit SharePoint content from within Visual Studio

A Visual Studio add-in to give developers the ability to edit SharePoint content from within Visual Studio.

http://spdevexplorer.codeplex.com/

SharePoint - Data at the root level is invalid. Line 1 , Position 1

When you open a file with SharePoint Designer, it creates all kind of FrontPage Server Extension functionality in your web application. One thing it does it that it creates a _vti_cnf folder in every folder you have in your web application.
If you remove all these folders you fix your problem.
http://weblogs.asp.net/soever/archive/2008/01/29/edit-file-in-wss3-web-application-with-sharepoint-designer-blows-up-your-web-site.aspx

Customizing Master Pages in Windows SharePoint Services - SharePoint Designer

http://msdn.microsoft.com/en-us/library/ms476046.aspx
http://msdn.microsoft.com/en-us/library/ms467402.aspx

Thursday, May 6, 2010

AX 2009 Enterprise Portal Development Cookbook - EP Manual

You can download the cookbook (EP AX 2009 Manual) here: http://blogs.msdn.com/epblog/attachment/9944064.ashx

Work with Text - copy to Clipboard

TextBuffer txtb = new TextBuffer();

txtb.fromFile("myfile.txt"); // Read text from file
txtb.toClipboard(); // Copy it to the clipboard

----

// Create a Text File...

txtB.setText("CIAO");
txtB.toFile("c:\\denis.txt");

Tuesday, May 4, 2010

Install SharePoint Server 2007 on Windows Server 2008 R2

http://blogs.msdn.com/sharepoint/archive/2009/10/02/install-sharepoint-server-2007-on-windows-server-2008-r2.aspx

Thursday, April 29, 2010

Web Debugging Proxy - Trace HTTP Traffic

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.

http://www.fiddlertool.com/Fiddler2/version.asp

Friday, April 23, 2010

Tuesday, April 20, 2010

White Papers and Resources for Microsoft Dynamics AX

https://mbs.microsoft.com/partnersource/documentation/whitepapers/resourcesax.htm

Wednesday, March 24, 2010

XSLT or XML interest link

http://www.topxml.com/
http://www.altova.com/mapforce.html

How to use XSLT in AIF and what’s wrong with empty xml Nodes

http://axstart.spaces.live.com/Blog/cns!E82F2C8CB173C0A0!302.entry


he AIF framework is able to communicate with XML messages to the outer world. However there is a small limitation. The format of this XML message should sometimes be altered for this outside world. Microsoft BizTalk can be a solution, when messages are send to different parties and every party has his own XML layout, but when this message has to be send to just one party XSLT can help you out.

XSLT is a mechanism that can rebuild an XML message to a different format (XML to XML or XML to xHTML).

It is possible in AX to use XSLT (BASIC\SETUP\AIF\XSLT Repository. You can use these XSLT in the Endpoint Actions Pipeline Components. The XSLT in AX can only transform the body node of the XML message.

You can test the default AX XML and your XSLT in AX using form tutorial_XSL

Cannot resolve collation conflict for equal to operation

http://www.marcopipino.it/sql/collation-conflict.php

Monday, March 22, 2010

Default Cube Advisor Tool for Microsoft Dynamics AX 2009

http://blogs.msdn.com/emeadaxsupport/archive/2009/04/29/default-cube-advisor-tool-for-microsoft-dynamics-ax-2009-has-been-released.aspx

Thursday, March 18, 2010

Integrating a Third Party Version Control System into Microsoft Dynamics AX 2009

https://mbs.microsoft.com/partnersource/deployment/documentation/whitepapers/ax2009_integratingthirdpartyvcs.htm

Tuesday, March 16, 2010

All about Virtualization....

http://www.virtualizationadmin.com/

Wednesday, March 3, 2010

Error executing code: Insufficient memory to run script - AIF, Reverse Engineering Tool, ect

In Dynamics AX 4.0 or Dynamics AX 2009 it can happen that a lengthy operation terminates with the following error message in the InfoLog:

Error executing code: Insufficient memory to run script.
A typical example that can result in this error message is when you are running the Reverse Engineering Tool of Dynamics AX 4.0 SP1. Another very common situation is when you are trying to process very large AIF messages with several thousand lines within AX or within an application that uses the Business Connector like the AX BizTalk Adapter.

With Dynamics AX 4.0 a new mechanism was introduced to limit the maximum amount of memory that can be allocated by variables (in X++ code) in a session. This maximum amount is set to 10 MB by default. For some operations like large AIF messages (that are stored in memory during processing) this is however not enough and so the operation is terminated when the maximum amount is reached.



http://blogs.msdn.com/emeadaxsupport/archive/2009/06/15/error-executing-code-insufficient-memory-to-run-script.aspx

Thursday, February 25, 2010

Dynamics AX 2009 SP1

https://mbs.microsoft.com/partnersource/support/selfsupport/servicepacks/dynamicsax2009sp1.htm

Wednesday, February 24, 2010

Setting up the TAPI interface in Axapta

http://daxguy.blogspot.com/2006/11/setting-up-tapi-interface-in-axapta.html

Friday, February 19, 2010

Update/Activate the SQL Server Evaluation Version

Once you install evaluation edition of SQL Server 2008 and then perform in place upgrade to full version, you may get below error message when you open SQL Server Management Studio :

Evaluation Period has expired.....

http://blogs.msdn.com/blakhani/archive/2009/03/10/sql-server-2008-evaluation-edition-expired-believe-me-i-already-upgraded-it-what-s-up.aspx

How do you know when a SQL Server Evaluation expired

look to the folder :\Program Files\Microsoft SQL Server\100\Setup Bootstrap\LOG\ and check the creation date of the file Summary.txt

Wednesday, February 10, 2010

Resetting usage data / Favorites Link

http://axaptafreak.blogspot.com/2007/06/be-careful-when-resetting-your-usage.html

Friday, January 29, 2010

Add new SharePoint Server to Existing Server Farm

http://blogs.msdn.com/priyo/archive/2007/08/11/add-new-sharepoint-server-to-existing-server-farm-an-unhandled-exception-occurred-in-the-user-interface-exception-information-unable-to-connect-to-the-remote-server.aspx

Thursday, January 28, 2010

Statement of Direction (Roadmap) for Microsoft Dynamics AX

https://mbs.microsoft.com/Cms/Templates/document/General.aspx?NRMODE=Published&NRNODEGUID={C543391C-739D-4B90-8E9C-5C9781A8510E}&NRORIGINALURL=/partnersource/marketing/statementofdirection/statementofdirection.htm?printpage=false&stext=ax%2520sod&NRCACHEHINT=Guest&printpage=false&stext=ax sod&wa=wsignin1.0

Wednesday, January 27, 2010

Microsoft Dynamics AX 2009 White Paper: Documentation Resources

http://www.microsoft.com/downloads/details.aspx?FamilyID=f4471844-dc4b-4e19-b2c9-c19442ab2991&displaylang=en

Application Integration Framework (AIF) Overview

http://msdn.microsoft.com/en-us/library/bb496535.aspx

Tuesday, January 26, 2010

Read All Files inside a directory

void FindAllCSV()
{
#Evat_NL
#File

Filename baseFolder;
Filename csvFilename;
Filename foundBaseFileName;
Filename foundFileName;
container mainFolder, subFolder, fileContainer;
boolean filesFoundMainFolder = true;
boolean filesFoundSubFolder = true;
int apiResult;

int setCurrentFolder (Filename _filename = '')
{
;
return WinAPI::setCurrentDirectory(_filename);
}

;
baseFolder = "C:\\TEST\\";

apiResult = setCurrentFolder(SysTreeNode::duplicatePathDelimiters(baseFolder));
mainFolder = WinAPI::findFirstFile("*.*");
foundBaseFileName = conpeek(mainFolder, 2);
while (filesFoundMainFolder)
{
if (foundBaseFileName != #currentFolder &&
foundBaseFileName != #upFolder &&
foundBaseFileName != '')
{
csvFilename = baseFolder + foundBaseFileName;
this.parmFileName(csvFilename);
This.readCSVfile();
}

apiResult = setCurrentFolder(SysTreeNode::duplicatePathDelimiters(baseFolder));
foundBaseFileName = WinAPI::findNextFile(conpeek(mainFolder, 1));
filesFoundMainFolder = foundBaseFileName ? true : false;
}
}

Client/Server Performance

By default, Insert, Update and Delete methods on the Tables are always server bound, even though it is not stated in the definition of the method.
The methods cannot be forced to the client because any client modifier is simply ignored by the Dynamics AX application runtime.

Dynamics AX Report can be executed on either the client or the server. Exactly where to execute the report is defined by the menu item that open the report. If reports are executed on the server but displayed on the client, the individual pages are generated on the server and sent to the client. If a report is executed on the client, the client renders and generates the report pages.

Rich forms are always executed on the client, which results in client/server traffic when fetching and manipulating records. In addition, display methods can degrade form performance because the displayed methods are executed by the form application runtime whenever it refreshes the forms control displaying the value.
A server-bound display method could cause a substantial number of client/server calls, especially if the display methods is show in a grid in which the returned value from multiple display methods is shown at the same time. You can, however, cache the value from the display method by calling the CacheAddMethod method on the FormDataSource object..The form Application runtime then caches the returned values and refreshes them only when the record is modified or re-read.

Monday, January 25, 2010

Migration Tools for Microsoft Dynamics AX 4.0

https://mbs.microsoft.com/partnersource/deployment/resources/migrationtools/dynamicsax_migrationtools.htm

Migration Tool for Microsoft Dynamics AX 2009

The Migration Tool for Microsoft Dynamics® AX 2009 helps migrating data from competing business management systems and legacy systems to Microsoft Dynamics® AX 2009.

By decreasing the time and expense of migrating the customer’s data, partners can increase the value of their services and gain a competitive advantage.

https://mbs.microsoft.com/partnersource/deployment/resources/migrationtools/dynamicsax_migrationtool.htm

Monday, January 18, 2010

The date format in Microsoft Dynamics AX 4.0 Enterprise Portal site is not changed after you change displayed the date format of SharePoint sites

SYMPTOMS
You change the displayed date format of the SharePoint sites in the Regional Settings Web page. However, the date format in Microsoft Dynamics AX 4.0 Enterprise Portal site is not changed. If you change the profile of the regional setting of the current user, the date format will not be changed either.

WORKAROUND
To change the date format, create and set a local interactive account for the Enterprise Portal (EP) user on the server that is running Internet Information Services (IIS) and then set the desired local regional setting. If you want to have a default regional setting for a user who does not have a local account, or does not have a user profile in IIS, change the system-wide setting of the server that is running IIS.

The underlying class that displays Web forms is the WebFormHtml class. The WebFormHtml class sends dates that are in the layoutDate() method. The layoutDate() method makes a call to the date2strUser(,,,) method to format the date. The date2strUser() method that is defined in "\Classes\Global\" is a wrapper around the date2Str() method.

In Enterprise Portal, date is formatted according to the regional settings that are defined in the server that is running IIS. When a user has a local profile in the server that is running IIS and a regional setting exists for this user, this local regional setting overrides the system-wide regional setting. By default, if the user does not have a user profile in the server that is running IIS, Enterprise Portal will use the system-wide regional settings of Windows Server 2003.

Friday, January 15, 2010

Patching White Paper for Microsoft Dynamics AX 4.0

https://mbs.microsoft.com/customersource/documentation/whitepapers/ax40patching.htm

Wednesday, January 13, 2010

Form Windows Resolution

WinApi::getSystemMetrics(1) o WinApi::getSystemMetrics(0)

Tuesday, January 12, 2010

Microsoft Dynamics AX 2009 Known Issues

https://mbs.microsoft.com/downloads/customer/AX2009Docs/Dynamics_AX_Known_Issues.htm

Microsoft Dynamics AX 2009 Technical Library

http://technet.microsoft.com/en-us/library/dd309624.aspx

Servicing Microsoft Dynamics AX 2009

https://mbs.microsoft.com/customersource/support/documentation/whitepapers/AX2009Patching

Friday, January 8, 2010

Reperire il campo chiave di una Tabella

DictTable DictTable;

DictTable = New DictTable(TableNum(Nome_Tabella));
print fieldid2name( dictTable.id(), dictTable.primaryKeyField());
pause;

Thursday, January 7, 2010

Form - Aggiunta campi dalla form UserSetup

Di default da impostazioni di una Form se si preme il tasto "Aggiunta Campi" AX permette di aggiungere SOLO i campi visualizzati nella form stessa.
Per poter aggiungere un campo non previsto, ma presente in tabella, bisogna a livello di proprietà del campo del Datasource andare a settare la proprietà "AllowAdd" a YES.

AX ASCII Functions

Converts a character in a string to the ASCII value of the character you have to use :

int char2Num(str text, int position)

Instead, converts an integer to the corresponding ASCII character you have to use :

str num2Char(int figure)

see also http://msdn.microsoft.com/en-us/library/aa653761.aspx

Tuesday, January 5, 2010

SQL Server 2008 - Key-Range Locking

http://msdn.microsoft.com/en-us/library/ms191272.aspx