web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Need syntax for StartupElementAction startup command

(0) ShareShare
ReportReport
Posted on by

I need to know the allowed syntax for the StartupElementAction startup command for DynamicsAx 2012.

It is possible to start an AX client using a URL like

Dynamics://0/?DrillDown_12345

Where 0 refers to the database and 12345 is the Alert Event ID in the EventInbox table.

But I want to open a specific form rather than rely on an existing event. There are other options besides DrillDown, like ViewAlertRule and AutoRun

Each one of those options seems to have its specific syntax which is checked by some unknown process BEFORE the AX client is started. For example, if I use letters in the EventId, then the AX client never starts.

What I need to know is what pattern is validated for the StartupElementAction option so that I can call a specific menu item. I was expecting something like

Dynamics://0/?StartupElementAction_MenuItem%5cDisplay%5cCustTableListPage

But that is invalid so the AX client never starts.

Has anyone ever used this functionality?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Startup commands are used as parameters of AX client application (Ax32.exe), for example Ax32 -StartupCmd=AutoRun_c:\ax_autorun.xml. See a bit more in Execute Startup Commands [AX 2012].

    The parameter of StartupElementAction is AOT path of a runable element with spaces replaced with ampersands (&). If you wanted to run display menu item called Ledger, you would use command Ax32.exe -StartupCmd=StartupElementAction_\Menu&Items\Display\Ledger.

    The dynamics URI scheme is handled by AxHLink.exe (not Ax32.exe) which communicates with AX via named pipes, so its purpose and abilities are different to normal startup commands. Find some technical details here.

  • Tom Zak2 Profile Picture
    on at

    The problem is that the syntax of the startupCMD parameter is different than the URI.

    You can use

    command Ax32.exe -StartupCmd=StartupElementAction_\Menu&Items\Display\Ledger.

    But you cannot use

    Dynamics://0/?StartupElementAction_\Menu&Items\Display\Ledger

    So apparently AxHLink.exe uses slightly different syntax. I had thought that the problem was the backslashes needing to be escaped with %5c, but that does not work either. I have also tried replacing the ampersand with %26, plus many more variations, trying to find the correct syntax for this undocumented Microsoft program. PartnerSource is no help for it either.  

    I had already reviewed the site you linked to, but that situation uses AutoRun and an XML file stored on the server, whereas, I want to be able to dynamically link to any form using a simple HTML hyperlink.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    I don't think that the problem is in slightly different syntax - I believe that the expectation that Dynamics AX External Drill-Down Protocol Handler (AxHLink.exe) supports the same parameters as AX Client (Ax32.exe) is simply wrong. These two applications do different things, AxHLink merely pass some requests regarding drill-down to AX client and it ignores everything what isn't a drill-down request. I don't know the internal implementation of the Drill-Down Protocol Handler, but this is how the behavior looks like and it also makes good sense.

    You can try to look at AxPath, if it works with AX2012, or you will have to implement something similar by yourself - or to change your requirements.

  • Alok Joshi Profile Picture
    540 on at

    Hi Tom ZaK2,

    I also have similar requirements to implement. I have gone through the entire thread and it is quite informative. However just curious to know how did you resolved it at the end?

    Appreciate if you can share details..

  • LORY Jonathan Profile Picture
    5 on at

    Hi Alok Joshi,

    i just develop a little trick (on AX V4) to open a specific form with "Dynamics://" link.

    It's probably not the best solution but it works fine until you have at less one AX instance opened.

    With that solution you can use some link like below :

    Dynamics://0/?DrillDown_[RecId]_[CustomAction]

    Replace [RecId] with the recid of the record you want to show.

    Replace [CustomAction] by a keyword, you will use it after.

    Go To "SysStartupCmdDrillDown" class, and open the "InfoRun" function.

    Insert your code at the top of the function that will test if your [customerAction] is present in the "parm" value.

    If it's the case, bypass the standard function and wrote your own functionnality.

    For Example, retrieve a customer by the recid located in the parameter, an open the custable form for the current record.

    Hope this will help.

  • PA-22040759-0 Profile Picture
    6,194 on at

    Here is an article about using the Pipe to open a particular form: axcoder.blogspot.dk/.../how-to-open-form-in-running-ax-from.html

    I had a prototype once, much like Lory's suggestion. But you need to have a client open in order have the pipe created and listening with this approach.

  • Community Member Profile Picture
    on at

    Hi Lory,

    I also need something as you have explained here , But I am facing a problem, when am trying to pass "Drilldown_[recid]_[anythinelse]" Axclient is not called.

    I have tested and found that Axclient is called only if we use an integer value which is in the range of int32.

    for example :-

    Dynamics://0/?DrillDown_2147483647(max value for int32) Ax client is fired but when I use any thing else

    Dynamics://0/?DrillDown_[recid]_[anyThingElse]

    or

    Dynamics://0/?DrillDown_[recid] (Ax recid which is always a greater value than int32 max limit) 

    or

    Dynamics://0/?DrillDown_2147483648(max value +1)

    Axclient is not fired.

    Could you please help me with what you changed to make it work ? BTW I am using AX2012 R3.

    Your help is deeply appriciated.

  • Douglas Noel Profile Picture
    3,905 on at

    Hi,

    take a look at my answer here

    community.dynamics.com/.../164185

    regards

    Douglas

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans