Wednesday, January 20, 2010

Workflow does not publish

I am working on a custom workflow to send sms. After some updates with the Plugin Registration Tool, and after I used some workflow parameters, I was unable to publish my workflow.

The error in trace file was


WF1399: Activity 'CustomActivityStep1_policy' validation failed: Property "RuleSetReference" has an invalid value. Rule set is invalid. Rule "main" validation failed. Type System.Globalization.CultureInfo is not marked as authorized in the application configuration file.

Error Details: Workflow compilation failed:


After reading this post I fixed it.

The fix as the message suggested was to give autorization to CultureInfo type. To do that I inserted the following line in web.config:

<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Globalization" TypeName="CultureInfo" Authorized="True"/>

on configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes

Monday, January 18, 2010

Invalid Action error MS Dynamics CRM 4.0

I got the Invalid Action error when trying to open Microsoft CRM 4.0.

Event Type: Error
Event Source: MSCRMKeyGenerator
Event Category: None
Event ID: 18949
Date: 18/1/2010
Time: 11:45:19 πμ
User: N/A
Computer: W2003VL-TEST
Description:
Current active key (KeyType : CrmWRPCTokenKey) is expired. This can indicate that a key is not being regenerated properly. Current Active Key : CrmKey(Id:f1a02af2-2ed4-de11-a055-0003ffd84353, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:11/18/2009 10:41:41, ExpiresOn:12/21/2009 10:41:40, CreatedOn:11/18/2009 10:41:41, CreatedBy:NT AUTHORITY\NETWORK SERVICE. Key Setting :

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Sunday, January 17, 2010

Strange Navision Problem

Last week I encountered with the following bizarre problem. In purchase orders I made a post of receipt and immediately I made a post of invoice. Because I forgot to put the related document no. of vendor the invoice throws an error (thats normal). Navision made a rollback of the transaction but the strange thing was that it rollback the receipt as well. At first I thought it was something wrong with our custom code but after an extensive examination I found that the problem was that after the post of receipt the transaction was not closed and when the invoice failed to post the rollback was made to the point before the post of receipt. I tried the same thing but I closed the purchase order form after the receipt, I opened it and then I made the invoice. Now it worked! For the record I used Navision 5.0 sp1 with sql server 2008 developer edition on windows xp sp3. In order to bypass the problem, I made an fbk backup and restore to a new database (the sql backup replicated the problem)