Wednesday, January 23, 2008

Microsoft FY08Q2 Results

FY08Q2: As always, my favorite post-analysis sites for the results:

At a simple level, I feel anything that Microsoft reports is like spitting in the wind during the current financial storm. I'll be interested in hearing if we have anything encouraging to say as being a safe-haven for investors during this period, given the current releases and the upcoming releases.

Mr. Todd Bishop has a preview and nails my concern about the analysts concern of our forward looking statements. Also - though I doubt it will come up except as a generalized catch-all warning - with the EU feeling us up again to try to figure where we moved our wallet to, we have more legal uncertainty to deal with.


Update: After the release...

FY08Q1: ba-da-Boom!

FY08Q2: ba-da-BING! (or should that be, "ba-da-Cha-CHING!"?)

Channeling an upbeat attitude that could be heard as, "no, really, our poo doesn't stink," Mr. Liddell got to take lead on one of the most positive and reassuring Microsoft quarterly results conference calls I've heard in a long time. He expressed extreme pleasure over the results, as do I imagine every Microsoftie (unless you do want to point at the stinky poo of OSB and how E&D / Xbox has a deep, deep hole of billions to fill income into).

I'd say every time I heard an analyst try to give Mr. Liddell a soft-pitch opportunity to say something negative or overly cautious, Mr. Liddell was like, "Nope, things are going great, and will continue going great. Or greater."

Safe-haven for the investors' money, indeed!

Oh, and kudos to Jason Maynard for asking Liddell about the new EU actions and how that figured into Liddell's thinking. Not much of a meaty answer (well, most of the answers weren't very meaty) but it was nice to hear such a challenging question. I hope it comes up again during our Friday Town Hall Meeting in 34, though I wouldn't expect a more detailed answer.

Follow-up posts:

MSFTExtremeMakeover: Q2 FY08 Earnings. Snippet:

Short version: strong results, increased guidance, generally upbeat tone, and no really embarrassing items for analysts to question. Good job! Yes, online continues to be a sinkhole for cash. But everyone is used to that by now, and at least the top line result is semi-respectable. Yes, there's still no color on actual large scale Vista deployments. But at least client revenue and unearned remains solid. Bottom line, if last report was sufficient to get some investors to take another look at MSFT, then this one should attract others and perhaps reduce doubts that last time was merely a fluke.

Mr. Joe Wilcox: Microsoft Watch - Corporate - Microsoft Q2 2008 by the Numbers. Snippet:

Liddell's confidence may have something to do with where Microsoft makes its money. Just four years ago, the majority of revenue came from North America. Now, 60 percent of sales are outside the United States, Liddell said. For the quarter, Microsoft sales increased 30 percent in emerging markets, 20 percent in established markets like Europe and 15 percent in the United States.

Even if the U.S. economy slows down, overseas sales could offset any decreases in technology spending here.

Mr. Todd Bishop: Microsoft beats quarterly estimates, raises forecast. Snippet:

Microsoft's Online Services Business was the only one of the company's five divisions to post an operating loss for the quarter, $245 million in the red. The company's Entertainment and Devices Division climbed to a $357 million operating profit thanks to holiday video-game sales. Chris Liddell, the company's chief financial officer, said this afternoon that Microsoft is still expecting that division to be profitable for the full fiscal year, which ends in June.

And the general attitude of the rest of the reports:

Ba-da-cha-CHING!

Now, let's be sure we don't start slipping back to our old sloppy ways, because, well, our poo does stink. Just like everyone else's.


Thursday, January 17, 2008

Creating and Posting Inventory ProfitLoss journals in DAX using .NET Business Connector

Yesterday, I was helping a friend from Canada create a small solution that would create and post ProfitLoss journals in Microsoft Dynamics AX 4.0 using .NET Business Connector.

In the end, we created 2 solutions - one was entirely written in X++, and only simple class static method calls were made from C#. The other was completely written in C#, using various classes, available with .NET business connector.

I uploaded the solution to the following link, in case anyone would be interested to download it and play around with it or use in their projects.
Download ProfitLossPostingAppl

Also, here is the source code - it is a small console application, and I tried to add as many comments as possible, so that even complete X++ beginners would be able to easily read the code.

Notice that in the solution, there is a reference to the business connector dll.
You can find the Microsoft.Dynamics.BusinessConnectorNet.dll in the Client\Bin folder of your Dynamics AX installation. This dll is what provides you with access to the Dynamics AX application and the set of classes to use AX tables and classes.

using System;
using Microsoft.Dynamics.BusinessConnectorNet;

namespace ProfitLossPostingAppl
{
class AxProfitLossPostingEngine
{
static void Main(string[] args)
{
Axapta ax = new Axapta();
// company name, language, object server, configuration
// this uses Windows Authentication
ax.Logon("cmul", null, "localhost", null);

try
{
// Start a transaction
ax.TTSBegin();

// AxaptaRecord is a class that allows to work with Tables in AX
AxaptaRecord header = ax.CreateAxaptaRecord("InventJournalTable");
AxaptaRecord journalName = ax.CreateAxaptaRecord("InventJournalName");
AxaptaRecord line = ax.CreateAxaptaRecord("InventJournalTrans");
AxaptaRecord inventTable = ax.CreateAxaptaRecord("InventTable");
AxaptaRecord warehouse = ax.CreateAxaptaRecord("InventDim");

// You can call static table methods using the following syntax
journalName = ax.CallStaticRecordMethod("InventJournalName", "find", "IPL") as AxaptaRecord;

// There is a set of predefined methods on the AxaptaRecord class, like the clear(), initValue, DML operations, etc.
header.Clear();
header.InitValue();
// You can call table object methods as well, not only static
header.Call("initFromInventJournalName", journalName);
header.Insert();

line.Clear();
line.InitValue();
line.Call("initFromInventJournalTable", header);
// You cannot use table fields directly as in X++. Instead you have set/get methods
line.set_Field("itemId", "B-R14");

// Instead of using static table methods (like find) you can execute a direct SQL statement and receive the result in the AxaptaRecord object
inventTable.ExecuteStmt("select * from %1 where %1.ItemId == 'B-R14'");
// If you receive more that one record you can iterate through them using Next (as in AX)
line.Call("initFromInventTable", inventTable);

line.set_Field("Qty", 160.0);

warehouse.Clear();
warehouse.set_Field("InventLocationId", "MW");

warehouse = ax.CallStaticRecordMethod("InventDim", "findOrCreate", warehouse) as AxaptaRecord;

line.set_Field("InventDimId", warehouse.get_Field("inventDimId"));
line.Insert();

// Notice AxaptaRecord is passed by reference here
ax.CallStaticRecordMethod("InventJournalTable", "initTotal", header);
header.Update();

ax.TTSCommit();

// You can call static class methods the same way you call table static methods, but using a different method on Axapta class
// So in case you wrote the posting in X++, you would be able to call it, passing the JournalId as the argument
// int numOfLinesPosted = (int)ax.CallStaticClassMethod("DEV_ProfitLossEngine", "postProfitLossJournal", header.get_Field("JournalId"));

// Or, you can use the AxaptaObject class to accomplish the same from C#
// You can initialize a new class using the Axapta class method
// AxaptaObject journalCheckPost = ax.CreateAxaptaObject("InventJournalCheckPost");

// Or using a static method, if that suites your needs better
// Notice here that an object of type AxaptaRecord is passed into a method that expects InventJournalTable as the argument
AxaptaObject journalCheckPost = ax.CallStaticClassMethod("InventJournalCheckPost", "newPostJournal", header) as AxaptaObject;
// You can object methods the same way you would on a table
journalCheckPost.Call("parmShowInfoResult", false);
journalCheckPost.Call("parmThrowCheckFailed", true);
journalCheckPost.Call("parmTransferErrors", false);

journalCheckPost.Call("run");
int numOfLinesPosted = (int)journalCheckPost.Call("numOfPostedLines");

Console.WriteLine(String.Format("{0} line(s) have been successfully posted", numOfLinesPosted));
Console.WriteLine("JournalId is " + header.get_Field("JournalId"));
Console.WriteLine("Press any key to continue ...");

ax.Logoff();
}
catch (Exception ex)
{
ax.TTSAbort();
ax.Logoff();

Console.WriteLine(ex.Message);
}

Console.ReadKey();
}
}
}



P.S. Of course, it would probably be a better idea to use classed InventJournalTableData, InventJournalTransData, etc.
But for the simplisity of the example, everything is done directly with tables.

Wednesday, January 16, 2008

Microsoft Dynamics AX 2009 - some of the new development features

Alexei Eremenko from Microsoft Russia has posted a number of articles about the new features that will be available in DAX 2009.
The original link, which is in Russian (but the main thing to look at is the code, which is universal): http://blogs.msdn.com/aeremenk/archive/2008/01/15/7118429.aspx

I would like to make a brief review of the features he talked about for the English-speaking population and another feature I liked that Alexei did not mention.

Let's start with the support for union in SQL statements (but only when using Query* classes).

query = new Query();
query.queryType(QueryType::Union); // The other value of QueryType is "Join"



Another Exception type has been introduced, which now actually allows to catch the DuplicateKey exception:

Table t;

try
{
while select forupdate t
{
test.Field1 = ‘xyz’;
t.update();
}
}
catch ( Exception::DuplicateKeyException, t )
{
infolog(‘Record already exists - ‘ + t.Field1 );
}



The bulk DML statements now allow using inner/outer joins, and you can access the result of the update_recordset operation to get the number of rows that were updated:

update_recordset batchJob setting
Status = BatchStatus::Canceled,
EndDateTime = thisDate,
Finishing = 1
where batchJob.Status == BatchStatus::Cancelling
notexists join batch
where (
(batch.Status == BatchStatus::Ready ||
batch.Status == BatchStatus::Executing ||
batch.Status == BatchStatus::Hold ||
batch.Status == BatchStatus::Cancelling)
&& batch.BatchJobId == batchJob.RecId
);

rowsUpdated = (batchJob.RowCount() > 0); // get the number of updated rows with rowCount()



And, the feature I enjoyed, is that we now have crossCompany support in X++. Meaning you can access data from tables from a number of companies in one query.
Here are code snippets to explain what I mean:

static void DataBaseAccess_CrossCompany(Args _args)
{
InventTable inventTable;
container companyContainer = ['IN1', 'QMS'];
;
while select crossCompany : companyContainer inventTable
where inventTable.ItemId == "B-R14"
{
print inventTable.ItemId, " -- ", inventTable.dataAreaId;
}
pause;
}



This code will print ItemId from 2 companies, even though InventTable has the property SaveDataPerCompany set to Yes.

The same functionality is available with the Query classes:

static void DataBaseAccess_CrossCompany_Query(Args _args)
{
Query query = new Query();
QueryBuildDataSource qbds = query.addDataSource(tableNum(InventTable));
QueryRun queryRun;
InventTable inventTable;
;
qbds.addRange(fieldNum(InventTable, ItemId)).value(queryValue("B-R14"));

query.allowCrossCompany(true);
query.addCompanyRange("IN1");
query.addCompanyRange("QMS");

queryRun = new QueryRun(query);
while (queryRun.next())
{
inventTable = queryRun.get(tableNum(InventTable));
print inventTable.ItemId, " -- ", inventTable.dataAreaId;
}
pause;
}



If you don't add any specific company ranges, the data will be retrieved from all companies you have access to.

Microsoft Dynamics AX 2009 has a lot more to offer, of course. But enough for today.

Thursday, January 10, 2008

Raikes and Other Exits

Well, I should be sweating to the 80's soundtrack at the ProClub with about half of Microsoft that's trying to squeeze in there for January to burn off Christmas cookies, but here everyday that passes yet another exit hits us, and today we have a biggie...

Jaffe: Exits Microsoft dealmaker Bruce Jaffe going startup - shoot, why swing billion dollar acquisitions when you can be a billion dollar acquisition?!?!

Fitzgerald: Another of the Microsoft old guard moves on All about Microsoft ZDNet.com.

Raikes! Microsoft Announces Retirement and Transition Plan for Jeff Raikes, President of the Microsoft Business Division Company announces it has hired Stephen Elop from Juniper Networks; Raikes will continue at Microsoft through September 2008.

Wow, I'm surprised. I can understand that Mr. Raikes has had a long, long career at Microsoft, but as we wonder about the leadership in the upcoming (and no doubt somewhat dysfunctional) post-Gates era, my money was riding on Mr. Raikes to step up and perhaps be on the shortlist for running more of Microsoft. At least Jeff gets to go out on a high-note.

And of all of our leadership at Raikes level, I respect him the most. There's something more to him (there is something there there) that I admired when around him.

And Stephen "Who?" Elop? I found it ironic that while Mr. Ballmer in the announcement email was praising Mr. Raikes ability to recruit, mentor and nurture Microsoft leadership, Raikes was not being replaced by someone he groomed. I tell you, if I was a Raikes direct I would seriously be considering whether I was ready for a new challenge, at Microsoft or elsewhere.

The Market's reaction on Friday? MSFT Extreme Makeover has an interesting comment on this:

The [external] choice for replacement seems to have the right pedigree, but Raikes did a solid job with Office and was widely seen as the leading candidate for eventual Ballmer replacement as CEO. So I don't think the market is going to react positively to the news tomorrow.

Two more quick things:

CES: MSFT Extreme Makeover has a compilation of BillG and CES and a take on the $1,200,000,000USD acquisition of Fast Search.

Xbox departures: a commenter makes the following observation:

It's weird that Mini and all the commenters here have failed to notice the mass exodus from the Xbox team in 2007. By my count, more than 15% of the product team (dev/PM/test) have left Microsoft for Apple, Sony, Google, Yahoo, MySpace, Amazon, and various other companies (including several startups, local and in the Valley).

This is great progress towards a Mini-MSFT!!

(Though, it's mostly bad attrition and has some other negative implications you can work out on your own.)

The main complaint I hear about the games / Xbox area is things are drying up given the "show me the money" religion that's been adopted. Some pet projects (or just random projects) that had nothing to do with future profit have been disbanded. Man, I can't even squeeze out some crocodile tears for that...


Administrivia: expect more CRF'ing after that last post. Boy, did that suck given all the high hopes I had for positive, aspirational comments. I'm bearing a grudge. I'm human. I'm upping the moderation a bit more to be on-topic and less open to general gripes by anti-Microsofters.


Thursday, December 27, 2007

Microsoft's 2008 - What's Going Well?

Here we are, wrapping up 2007 and launching into 2008. I continue to believe that we're in a good transition time at Microsoft and that 2008 will help cinch that transition as some of the bigger products wrap up major development (Office 14, Windows 7). Trying to keep a positive vibe, I just want to share some of the things going on in and around Microsoft that I see as goodness. I'd like to know what you honestly think is going well, too.

Indulge in some praise, too, if you will. We can get around to the constructive criticism after we're settled into the new year. Drop by MSFT Extreme Makeover for a dose right now if you need a hit.

Competition: Praise the Lord for competition. Without some light to shine the way, we really tend to get lost in our own initiatives. Think of pre-reset Longhorn. Think of post-IE6 (Blake Ross, I've got a hug with your name on it). So I'm thankful for Google, Facebook, Apple, and Adobe. And Amazon. And Nintendo. And all those startups who show that good ideas don't take an army to deliver. And that design matters. And that everyday citizens have cash they'd like to spend, too, for quality products. If it wasn't for our competitors doing so well in their respective areas I'm willing to bet that we'd still being ignoring good design and consumer facing features. As of now, those internal champions have leverage.

Something I haven't seen before, especially around Apple, is a level of humbleness and respect when considering, say, what Apple is doing - and doing well - and how we can endeavor to do better ourselves. I haven't or heard much trash-talking around Apple, but rather aspirational discussion. That's great and makes me believe that we'll be able to deliver something that actually delights our users... and hopefully therefore our shareholders.

I've been bummed lately when our competitors screw up. Really. No schadenfreude here, as much as they do indulge in it in our direction. Yeah, I'm bummed when Apple's latest OS comes equipped with a Blue Screen of death and other failures. When Facebook starts upskirting all of their users' purchases. When Google potentially jumps the shark. I'm bummed because their great accomplishments serve as a big walloping stick to break through blockers at Microsoft (because there are still people convinced that the most secure, robust, solid features are those that you don't ship - not exactly a formula for success 100% of the time).

Their failures serve as excuses to keep on doing what we're doing, or less.

Surprise! Holy smokes, stop your grinnin' and drop your linen! I love my new Zune player. That's right, I'm having a blast listening to my tunes and podcasts on my little black 8GB Zune. I promised to buy a Zune when a solid-state Zune with wireless syncing came out. Now, I'm sure you iPod fans just had to spit out three mouthfuls of foamy indignation. Uncross your eyes and let me comfort you in saying that yes, the iPod is still better. When I picked up the very first iPod nano I was amazed at how it just worked. It was delightful. Not delightful is the decision I made years ago to rip all my music in WMA. Now I know all that is just one big transcoding script job away from being something else, but I'm sticking with WMA. And the Zune is my first WMA player (going through about five different players, all the way back to an Intel 64MB player I first owned) that just works right.

And I really enjoy the Zune desktop software. And I intend to rip off some of their UI designs. Imagine that! A Microsoft team ripping design ideas off of another Microsoft team. "Hello, Hell? How's the snow?"

Solid VS2008? When VS2005 came out, there was a series of negative reactions I noted, mainly around its IDE. Dealing with the VS teams quite often, I certainly know they did a major reset in the way they develop software post VS2005. Is it paying off? If so, will other teams adopt this level of engineering excellence to address issues they have in shipping solid features?

DRM die-off? Raise your hand if you love DRM. I don't dork with anything that has DRM because it's so incredibly rare that I've gotten that crap to work without a lot of manual intervention. How am I supporting the non-DRM initiatives? By spending cash buying MP3 albums as much as I can stand. Radiohead. Amazon. And even the Zune Marketplace MP3s (surprise, part II). Do you hate DRM? Show the DRM-free music the love, then. As expressed in cold, hard cash. Or dippy Live points. Put down the Rock Band guitar and go buy some classic tunes in MP3. This kind of success will help Microsoft detangle itself even more from the DRM monster (which, by inadvertently killing Plays-for-Sure, we're well on the way).

Translucency: I know there are a lot of customers, partners, and competitors who enjoy knowing everything going on with every little new Microsoft feature along the way. When it comes to translucency vs. transparency, I support putting the kimono back on and tightening it up, perhaps doing so in an enticing burlesque-style way, revealing only what we want to reveal. A little toe here, perhaps an ankle there...

Part of my support is obviously Jobs/Apple envy of being able to surprise people with a feature just being released. The other is avoiding embarrassingly-public screw-ups like WinFS or other big features we're going to deliver and then end-up cutting. I think we've stopped being the Britney of the software-news world, now we're aspiring to be the Angelina Jolie.

Obviously, we'll still be doing betas for Windows and Office so that by the time they are released everyone will be yawning about the by-then well-known features, but I hope we can pull-out a few surprises and underpromise and overdeliver. So: way to go IE8 team! And I'm looking forward to seeing the reactions at Mix08.

Not the Bad Guy? It's taken a long time, but I don't believe we are perceived as the Evil Empire anymore. Part of that went out when people decided, at least contextually, to bust apart our empire. Okay, fine, we're playing catch-up now (wink wink). Now the evil part starts fading based on the relative failings of other firms. This is a grand opportunity for Microsoft to follow a vision like the one that Mr. ... Mr. ... Mr. Ozzie shared with us (wow, my mind blanked trying to remember his name there for a second... not sure what that means) at the 2007 Company Meeting and be the good guy on the side of the citizen and their private information, making it protected and easily transportable so that you are assured that you own and have access to what's yours, even it if passes through our clouds.


(Administrivia: sorry for falling off the map, but it just plain hasn't been computerized happiness for me over the past month given a wonky Neomailbox email service [probably anything you sent to me directly from the middle of November for a few weeks got bit-bucketed] and a series of cascading hardware failures on the home network. This is the first time in a while I've gotten the "Mini" account going again vs. the minimal life-support it has been on. It's still rough going as I try to duct-tape things back together and bond with Notepad for a while. I guess I'm working through some karma here.)

Tuesday, November 20, 2007

Inside Microsoft Dynamics AX 4.0 in Russian

This entire week is actually special.

The Inside Microsoft Dynamics AX 4.0 book will very soon be available in Russian.
I was the one helping with the translation.
I am now finished with all 18 chapters with just some minor corrections left to other parts of the book.
So I will try to get back to posting about AX very soon.

Next week, on Tuesday (November 27th) Moscow will be hosting an annual Microsoft Technical Event.
You can read more about it on http://platforma2008.ru/ (Russian language only)
The new book will be presented there, so make sure and visit if you can.

Microsoft Dynamics AX Community recognition :)

Today is a special day for me. And for the community as well, I hope :)

I was replying to one of the posts on the community and noticed, that now I have a bronze medal near my name.

Here is what it means:
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#Levels
(it means I had 51 replies marked as Answers)