Developing a business connector application

25 05 2010

OK, so its slightly off my main blog topic, but I was quite interested to understand how the Workflow Website communicates with Dynamics AX through the .NET Business connector. So I decided to experiment and try build my own application using it. Much to my surprise it proved to be a quite easy and enjoyable experience with no major hiccups along the way (provided you have an AX client and Business Connector configuration already setup).

As an experiment I attempted to build a time tracker in C# to run on my desktop in order to actively keep track of the time that I work on my various client’s systems. It reads project information (activities, categories, projects etc..) from AX to populate the form. It then writes time data back to a table back in AX.

With relatively minimal effort I was able to accomplish exactly what I needed to. If you want to try your own hand at writing business connector applications, check out the MSDN walkthrough ovver here: http://msdn.microsoft.com/en-us/library/aa868997.aspx

Going through this exercise really helped me understand how the whole Dynamics AX 2009 Workflow framework functions. Well worth the time.





Disabling approval outcomes, while still using them for automatic actions

21 09 2009

We have an approval step within one of our client’s workflows where the client does not want one of the outcomes (Deny (Reject) ) to be available. However the ‘deny’ function is needed for use by an automatic action, namely the action that is taken if all escalation steps fail. So at first i tried disabling the option on the Approval’s ‘Advanced’ tab. However i got a lovely message (It is not possible to disable an action that is in use. The ‘Reject’ action is in use in the following places … ) saying in effect i may not do this, which I guess makes sense, however I would still however like to hide this outcome to the users. Hence my 2 ideas/approaches:

1) Add logic within your Class linked to your outcome’s MenuItem that pops up a message or something saying “Outcome not allowed” – Not very desirable
2) Add a configuration key to all the Menu Items that you wish to not have users press and disable it on a system wide level – Also perhaps high maintenance solution, but it seems to achieve the outcome satisfactorily.

So far I have gone with the second option. Seems quite neat and the logic for that outcome is stored in event handler, so it still successfully gets executed.

Any comments welcome!J








Follow

Get every new post delivered to your Inbox.

Join 135 other followers