Sunday, 22 November 2009

Hi all

The other day I was given the task of updating an InfoPath template part that was in use on a laptop, because a newer version of this template part was available.

Upon opening the InfoPath client, I saw this:

image

There were two template parts, and in this case they are named “TemplateGroup1” and “TemplateGroup2”. I had a new version for the “TemplateGroup1” template part. I clicked on “Add or Remove Custom Controls” and got this screen:

image

As you can see, the “TemplateGroup1” does not show up, which I thought was weird. So, I tried clicking on “Add” to just add the new version of the “TemplateGroup1”, but that gave me this error:

The custom control, <TemplateGroup1> (urn:schemas-microsoft-com:office:infopath:templategroup1:-myxsd-2009-11-22t19-43-32), is already installed. Remove the existing custom control, and then try installing again.

So, I was at a loss… I couldn’t remove the existing version, and I couldn’t upload a new version.

Finally, I discovered what had happened. The user has an entry in the registry like this:

image

The key “IPCustomControlsFolder” is placed in the “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\InfoPath\Designer” path of the registry. All template parts you put into this folder are automatically added to the controls of InfoPath.

So I found that path, and deleted the “TemplateGroup1” template part, and everything was fine.

So, what I now know is, that there are two ways of adding new template parts to be used by InfoPath:

  1. Add them manually inside the InfoPath client (or the toolbox in VS.NET)
  2. Add the right registry key to the registry, so you have a repository of template parts. This is especially useful for a repository on a shared network folder that can be used for all employees.

So if you ever have trouble removing a template parts from the custom controls section, look for the registry key.

--
eliasen

Sunday, 22 November 2009 21:35:51 (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 
Tuesday, 17 November 2009

Hi all

I KNOW it is old, but I have just today finally taken the time to listen to an interview on Channel 9 with Sean O’Driscoll, who is the general manager for community support and the MVP program. You can find it here.

Sean talks a lot about what the MVP program is, and I’d like to just take a couple of really important points from his talk and list here

  1. The MVP award is a “Thank you” for your PAST efforts in the communities. There are NO expectations to an MVP about what to do the next 12 months or the next day, even.
  2. The MVP award lasts 12 months. After that you will have to be reevaluated to see if your past 12 months of contributions to the community have been good enough to warrant a reaward.
  3. A true MVP gets the award not because he wants the award but because he wants to help people. A true MVP would do exactly the same effort in communities even if there was no MVP award.

Especially the third point is important to me. I mean.. the first time I was awarded the MVP title, I got an email from MS stating that I had been nominated, and I had to go search on the internet to find out what the MVP award was, because I had NO idea…

Anyway, it’s a good video – go watch it! :)

Edit: Only 15 minutes after I posted it: Sean is no longer GM of community support. Toby Richards is that now. Big thanks to my very fast MVP lead Gerard Verbrugge for setting me straight! :)

--
eliasen

Tuesday, 17 November 2009 19:16:36 (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 
Saturday, 14 November 2009

Hi all

Here at Logica in Denmark, we have just been told that we have been chose as the Danish Microsoft Partner of the year. We are naturally quite proud of this, and one of the reasons for choosing us is, that despite the financial crisis we have gained market shares.

You can read Microsofts press release (only in Danish, I am afraid) here: http://www.logica.dk/file/18133

--
eliasen

Saturday, 14 November 2009 14:59:25 (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 
Friday, 30 October 2009

Hi all

Just a quick note to let you all know that my friend and colleague Jakob Lund Krarup has started a new blog about writing games using Microsofts XNA framework.

So if this interests you, do follow it :-)

 

Edit (2009-11-04): The link to the blog is http://www.xnafan.net – which I seem to have missed just before…

 

--
eliasen

Friday, 30 October 2009 19:44:57 (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 
Sunday, 25 October 2009

Hi all

Today I tried playing with the “Fixed” property that can be set on an element or an attribute in your schema. According to the documentation, this is then a value that MUST be present in the element.

image

So the mapper is actually quite down with this – you cannot map anything to the field that has a value in the “Fixed” property. And when expecting the XSLT that is generated by the mapper you will find, that the mapper simply inserts the correct and hard coded value into the field.

image

Great.

Now, I created some links in the map just to test it, and chose that the mapper should validate the input for my map, but not the output, since I hadn’t bothered dragging all the necessary links.

To my surprise I got this error:

   1:  Output validation error: The value of the 'MiddleNames' element does not equal its fixed value.

An error validating the output of the map… but this surely must be a mistake, because I turned validation of the output from the map off and besides; the value in “MiddleNames” cannot be wrong, because the mapper has put it there it self, taken from the schema. Very weird indeed.

Only after quite a search, did I discover that the error was in validation of the INPUT to the map and not the output. I had used the same schema as both input and output, and my input instance did not have the correct value since it was an old test instance.

But really… Microsoft… that error message could be better! :-)

Hope this helps someone.

--
eliasen

Sunday, 25 October 2009 21:33:15 (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 

Hi all

As many have noticed, I am co-authoring a book and right now I am writing all my stuff in Word 2007.

As you might have guessed, I have lots of sections, subsections, figures, tables and other numbered items in my text, and naturally, they are there because I need to reference them in my text.

In order to insert a cross reference from some text to a given numbered item, I found two options:

  1. Go to the “References” tab and click on “Cross-reference” in the “Captions” section.
  2. Go to the “Insert” tab and click on “Cross-reference” in the “Links” section.

Both will give me this window:

image

This is all very fine, but I need a quicker access point, since it appears that I most often need both clicks to get to the dialog box, since I am usually not on either the “Insert” or the “References” tab.

So I discovered the “Quick Access Toolbar” by chance. This happened when I accidentally right-clicked on the “Cross-reference” in stead of clicking on it. Here I could add the functionality to the “Quick Access Toolbar” and also choose to show the “Quick Access Toolbar”, as seen here:

image

The arrow points to the “Quick Access Toolbar” and the red square is around the “Cross-reference” functionality. So now I always only need one click, which made me happy… for a while :-)

Because once I could do it with just one click, I started wondering about a keyboard shortcut for it. I couldn’t find one, and I searched and searched… and finally just after posting my question to a newsgroup, I found how to do it:

Go to “Word Options”, which is a button at the lower right when clicking on the Start button at the upper left of Word:

image

This will open up the Word Options. Go to “Customize” and click on “Customize…” as seen in the image below:

image

After this you get a screen where you can change short cuts, as seen here:

image

Choose “Insert Tab” and then “InsertCrossReference” and click in the “Press new shortcut key:” box. Now enter the shortcut you want (I entered Alt+Ctrl+Shift+C). Word will tell you if the shortcut you have chosen is all ready assigned to another function (Mine is “Unassigned” as you can see) and then you can click on “Assign” to complete the task.

So now, every time I need to insert a cross reference, I just pres Ctrl+Alt+Shift+C and the dialog box comes up.

All that is left now is to get the “Only Label and number” as the default value for the drop down that decides what to insert instead of “Entire Caption”, but a Word MVP wrote in a post I found that this was not possible. Bummer. Keeping my fingers crossed for Office 2010! :-)

I hope this helps someone.

--
eliasen

Sunday, 25 October 2009 15:34:46 (Romance Standard Time, UTC+01:00)  #    Comments [3]  | 
Saturday, 24 October 2009

Hi all

If you are also receiving this error when unit testing your schemas:

TOMTreeGenerator.GetElementAbsoluteType: Object reference not set to an instance of an object.

then I can inform you that the reason is, that the built-in unit test framework does not support schemas that include or import other schemas.

To partially overcome this, take a look at the seventh issue of the BizTalk Hotrod at http://biztalkhotrod.com/default.aspx, where it is explained how to write a small helper class that will allow you to do unit testing on schemas that include and/or import other schemas.

Unfortunately this does not cover native file formats, but one can hope that Microsoft will improve the unit testing features in future versions of BizTalk.

Saturday, 24 October 2009 21:51:56 (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Sunday, 18 October 2009

Hi all

My apologies for writing something that is only relevant for the Danish audience.

Anyway, my friend and former colleague Jesper Petersen and his wife, Helle Petersen have started a new web site at http://www.delebarn.dk. The web site is a tool for parents that are divorced and need a some way of communicating about their children. There are lots of features that a free and you can buy a VIP membership quite cheap.

The site is only in Danish.

So if you are divorced and need some way of handling information about your children, like; How did it go at the doctor? When is football practice? And lots, lots and lots other stuff, then take a look at http://www.delebarn.dk.

Thanks

--
eliasen

Sunday, 18 October 2009 19:46:44 (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Saturday, 17 October 2009

Hi all

The other day I ran into a strange error when compiling my BizTalk solution. It was a simple solution, which I was fairly sure there was nothing wrong with. I had two projects. In the first I had a public orchestration and in the second I had a schema and an orchestration that calls the orchestration in the first project.

So the project structure looks like this:

project_structure

So not something that would normally go wrong. Anyway, the “customer.biztalk.sendmail” project compiles just fine. But when I compile the “eliasen.customer.test” project it fails with these three errors:

  1. identifier 'biztalk' does not exist in 'eliasen.customer'; are you missing an assembly reference?
  2. cannot find symbol 'customer.biztalk.sendmail.Send_Receipt'
  3. 'biztalk.sendmail.Send_Receipt': can only call or exec a service

This was weird. Apparently the called orchestration (customer.biztalk.sendmail.Send_Receipt) could not be found. Now since there has been a lot of issues with the copy local functionality being broken, that was my first thought. But since my solution had never been deployed and using Reflector on the customer.biztalk.sendmail assembly that was copied to the bin folder of the eliasen.customer.test project had all the right classes, I skipped that idea.

Then, just to be sure, I checked that “biztalk”, “customer” and “sendmail” aren’t reserved words in XLANG/s here: http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx – they weren’t.

Then I googled the “can only call or exec a service” error and found a couple of hits, but none that I could directly relate to my issue.

Then, as if struck by divine intervention, I thought of changing the namespace of the orchestration that was being called. Maybe in hindsight it makes sense, since one of the errors is telling me that it is looking for “biztalk” in the “eliasen.customer” namespace, which really doesn’t make sense at all.

Anyway, I opened up the properties of the called orchestration and changed the namespace:

new_namespace

and then it compiled… after re-choosing the called orchestration in my “Call Orchestration” shape. This, of course, is not acceptable – I want to be able to have any namespace I want. It seems that somehow the compiler matches the “customer” in “customer.biztalk.sendmail” to the “customer” in “eliasen.customer.test” with each other.

I have tried looking deeper into this, but I can’t seem to find the exact reason it is failing, so I will probably just report it to Microsoft and then let them deal with it :-)

Hope this helps someone…

--
eliasen

Saturday, 17 October 2009 22:59:34 (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Friday, 16 October 2009

Hi all

Today I discovered something I was not expecting while documenting something else, which I have just described here.

I had a solution that involved this input schema:

inputschema

and this output schema:

outputschema

Field1 from the input schema and Field3 form the output schema are promoted to the same property and Field2 form the input schema and Field4 from the output schema are also promoted to the same property. Note, that Field4 is an attribute, whereas Field1, Field2 and Field3 are elements.

I then have a map that does not map anything from the input to the output. It just creates empty elements/attributes in the output schema.

I added a receive port and receive location to read in the input and used the XMLReceive pipeline, because I needed the messagetype and I needed the property promotion. I added my map to the receive port. I then created a send port that basically just took everything that came in on the receive port and sent it out to a file. The send port uses the XMLTransmit pipeline.

The output from this was, as I expected. Given this input:

inputinstance

I got this output:

outputinstance

What happens is, that demotion is not supported for attributes, which really seems like a silly restriction, but that is just how it is.

When, however, I implemented my solution using an orchestration, it worked! The value of Field2 in the input was demoted into the value of Field4 in the output.

My orchestration is very simple:

orchestration

Basically, I receive the input, transform it using the same map as was on the receive port, copy over all the properties:

   1: OutputMessage(*) = InputMessage(*);
   2: OutputMessage(DemotionTest.Property1) = InputMessage(DemotionTest.Property1);
   3: OutputMessage(DemotionTest.Property2) = InputMessage(DemotionTest.Property2);

The reason that I copy over Property1 and Property2 manually is, that they are marked as MessageDataContextProperty in the property schema, and therefore, they are not automatically copied over using the OutputMessage(*) = InputMessage(*) statement.

After doing this, I just send out the message. The result is this:

outputinstance2

Now, this confused me… and what confused me more is, that I can actually do it with the passthrough pipeline on the send port. This means, that the demotion is happening as the orchestration publishes the message into the MessageBox for sending out the message.

So the upside to this is, that demotion for attributes DOES work – but only when the demotion occurs inside an orchestration upon sending out the message.

The downside is, that the product team have managed to do things differently depending on where in the process it happens, which really sounds like bad design. Hopefully they will fix this at some point in time.

Hope this helps someone

--
eliasen

Friday, 16 October 2009 13:52:43 (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 

Theme design by Jelle Druyts