Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

startup - What handles dynamics:// URLs?

I'm trying to create my own custom drilldown functionality, where a URL dynamics://0?myfunction_123456 will launch my own code.

In CSysStartupCmdconstruct, this base code:

    case 'viewalert':
        sysStartupCmd = new SysStartUpCmdViewAlert(s,parm);
        break;
    case 'drilldown':
        sysStartupCmd = new SysStartUpCmdDrillDown(s,parm);
        break;
    case 'viewalertrule':
        sysStartupCmd = new SysStartUpCmdViewAlertRule(s,parm);
        break;

I've tested and these all get fired with these URLs:

  • dynamics://0/?DrillDown_382576
  • dynamics://0/?ViewAlert_382576
  • dynamics://0/?ViewAlertRule_382576

However, if I add my own case, leaving all other code the same, I can't get the URL to fire:

    case 'myFunction':
        sysStartupCmd = new SysStartUpCmdDrillDown(s,parm);
        break;

I've dug all over the system and can't figure out what causes the dynamics:// URL to only fire for those three cases. Is there a registry entry or something? I've found CEventDrillDownPoller which appears to create a PipeServer to maybe handle what's incoming?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Of course, I figure out my own answer every time I type up a stackoverflow question, but I think the information is really useful.

This stack question led me to find out that C:Program Files (x86)Microsoft Dynamics AX50ClientBinAxHLink.exe %1 handles Dynamics:// URLs.

Which led me to Microsoft's community forums where somebody else was facing a similar problem as me.

So the solution would be to either:

  • Create custom a URI handler with C# or some other language to communicate to AX (Similar to this)
  • Hi-jack one of the 3 handled existing cases with some custom X++ code to try and fork off of it. Perhaps by changing the drilldown target in the URL and handling that way, or appending some special characters to the string.
  • Call "c:Program Files (x86)Microsoft Dynamics AX50ClientBinAx32.exe" -startupcmd=myfunction_myParams and make that a clickable link.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...