2

Is there a way to open a specified document, eg "production order 123" or form, eg "purchase orders" in Ax2012 from an external application directly?

In detail, I'm looking for something similiar like AXPath, but this doesn't work with versions greater then 2009.

Is there any ( maybe included ) way to achieve this?

Nico
  • 1,175
  • 15
  • 33

1 Answers1

2

There is! It's using AX's drilldown functionality which uses AxHLink.exe to handle dynamics:// URLs, which are passed to the Classes\SysStartupCmd function. You could also create some custom code there if you wanted to launch the AX client executable directly.

My question I asked some while back should have a great deal of useful information in it here:

What handles dynamics:// URLs?

Some more can be found: http://technet.microsoft.com/en-us/library/aa834337.aspx

EDIT: It sounds like you are confused or the posts weren't clear enough. I think you have 3 basic options.

  1. Dynamics:// URLs are handled by AxHLink.exe and they only seem to handle drilldown, viewalert, and viewalertrule. So if you want to use Dynamics:// URLs, you will need to hi-jack those somehow. There is a pastbin from Jan in that other stack post.
  2. Create a custom URI handler and event poller (lot of work) see http://axcoder.blogspot.dk/2010/10/how-to-open-form-in-running-ax-from.html
  3. Extend SysStartupCmd and then instead of using Dynamics:// URLs, just call Ax32.exe -startupCmd directly and a parameter can be passed to your custom class.
Community
  • 1
  • 1
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
  • I read all of your linked article and also the ones linked there, but I don't get an event fired in AX. I added the URL-Protocol, tested with some links like you mentioned in your post and set a breakpoint in the specific class - at not time this breakpoint is hit. Do you have any hints? – Nico May 06 '14 at 12:16
  • I updated my original post because this comment was too small. – Alex Kwitny May 06 '14 at 15:51
  • Well, the described way is correct and it works now. But: **You have to open AX via AX32.exe**. If you open AX via axc-File, the events don't work (at least in my tests). I marked your answer as correct one - perhaps you could add this little but weighty aspect! – Nico May 07 '14 at 07:36
  • Ah you can still open AXC files, but you open AX32.exe and pass the AXC file and the parameters. – Alex Kwitny May 07 '14 at 18:27
  • Yes I believe. You just create a shortcut that's something like `c:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin\Ax32.exe "c:\MyAxc.axc" -startupCmd=[...]`. I can't remember the exact syntax, but if you play around with it, you should be able to figure it out. – Alex Kwitny May 08 '14 at 16:05