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