HOWTO: Open AX form from custom help file.
There is one interesing feature available in help file. You could link AX Form directly from help file. There is an example in standard AX 2009 installation.
- Open form Accounts receivable / Setup / Customer groups.
- Press F1
- Open file will be opened as on following picture
- There are a links in text as Customers or Term of payments.
- When you click on those links then coresponding AX Form will be opened directly.
How to achieve same function
With creating help file it will be necesary use a Help Kit for Microsoft Dynamics AX. Next tool which I will recommand you is a HTML Help Workshop and Documentation. For linking AX Form into code there is a special function located in script_main.js file located in folder local of help kit. Syntax of this function is following:
function AxMenuItemExecute(MIType, MenuItem)
{
try
{
var intMenuItemType;
switch (MIType)
{
case "Display":
intMenuItemType=0;
break;
case "Output":
intMenuItemType=1;
break;
case "Report":
intMenuItemType=2;
break;
default:
return; // Take no action.
break;
}
AxLabel.RunMenuItem(intMenuItemType, MenuItem);
}
catch (e) {
//window.alert("Failed to execute menu item.");
}
}
Using of this function is quite simple, there is an example of opening Term of payments.
<a onclick="AxMenuItemExecute('Display','paymterm')">Terms of payment</a>
To be able call this function successfull you have to add a reference to AxLabel object in each html page in your help file.
<OBJECT ID="AxLabel" CLASSID="CLSID:F5DD8727-673F-4523-869A-35AAA05AE782"></OBJECT>
Karel F
Comments
- Anonymous
April 21, 2009
PingBack from http://www.anith.com/?p=30718