It doesn't appear as if there is a forum here for Dexterity programming - so this is going here. (sorry for the winded post, but I thought I'd better explain in full where I'm at)
I went through the entire Quick Start guide to get a feel for how to create an application in Dexterity.
So I began work on my integration. I've copied my Dynamics.dic file to a development folder to use for development.
The first thing I did was create a simple Form/Window to house my integration, and then try to create a menu item so that I can actually access and test it.
The IG manual wasn't very clear on how to add a menu item (ie. places to put the scripts), but by examining the sample integration I was able to figure out how it was supposed to be handled.
I first created a Form (Command_PDP_IG) which contains a Window (Dummy) that has AutoOpen equal to False. It also contains the command mnuPDP_IG_Open which has a type script:
I then created a script to add the menu item to the form. I basically modified the example script slightly to supposed to add my menu item (along with a separator). According to my understanding these should show up in Cards>>Sales.
I then added a script called Startup that added this as a trigger:
I have confirmed that the script PDP_IG_CreateMenuItems does indeed run (by placing warning prompts at the beginning of the script), yet I receive no errors - but I see no menu item either.
The command does have display text, and I've tried using the product Id return from the Runtime_GetCurrentProductID() function (found that from Dave on another site).
Ideally I'd like the menu item under Transactions>>Sales - but that is trivial (CL_Sales_Transactions).
How can I get this menu item to show up? Any ideas?
I went through the entire Quick Start guide to get a feel for how to create an application in Dexterity.
So I began work on my integration. I've copied my Dynamics.dic file to a development folder to use for development.
The first thing I did was create a simple Form/Window to house my integration, and then try to create a menu item so that I can actually access and test it.
The IG manual wasn't very clear on how to add a menu item (ie. places to put the scripts), but by examining the sample integration I was able to figure out how it was supposed to be handled.
I first created a Form (Command_PDP_IG) which contains a Window (Dummy) that has AutoOpen equal to False. It also contains the command mnuPDP_IG_Open which has a type script:
Code:
open form PDP_IG;
Code:
in integer LoadMode;
optional in boolean ShowProgress;
local CmdSequence Seq;
local integer Status;
local boolean AddMenuItems;
local integer Prod_ID;
Prod_ID = Runtime_GetCurrentProductID();
{Set the flag indicating that menu items should be added}
AddMenuItems = true;
if LoadMode = MENULOAD_TOTABLE then
{Find out whether the menu items exist in the Menu Master table.}
if MenusExistForProduct(PDP_IG_PROD_ID) of form syMenuObj = true then
{Do not need to add the menu items}
AddMenuItems = false;
end if;
end if;
if AddMenuItems = true then
{Add a separator, which is a built-in command}
Seq = 0;
Status = AddCommandToMenu(DYNAMICS,
resourceid(form Command_Sales),
resourceid(command CL_Sales_Cards of form Command_Sales),
Seq,
CMD_BUILTINCMD_DICTID,
CMD_BUILTINCMD_FORMID,
resourceid(command cmdSeparator),
true,
LoadMode);
if Status <> OKAY then
error "Could not add separator item.";
end if;
{Add the mnuPDP_IG_Open command}
Seq = 0;
Status = AddCommandToMenu(DYNAMICS,
resourceid(form Command_Sales),
resourceid(command CL_Sales_Cards of form Command_Sales),
Seq,
PDP_IG_PROD_ID,
resourceid(form Command_PDP_IG),
resourceid(command mnuPDP_IG_Open of form Command_PDP_IG),
true,
LoadMode);
if Status <> OKAY then
error "Could not add command mnuPDP_IG_Open.";
end if;
end if;
I then added a script called Startup that added this as a trigger:
Code:
local integer l_result;
{local string path;
local boolean result;}
pragma(disable warning LiteralStringUsed);
l_result = Trigger_RegisterProcedure(script CreateDefaultMenuStructure, TRIGGER_AFTER_ORIGINAL, script PDP_IG_CreateMenuItems);
if l_result <> SY_NOERR then
warning "Procedure trigger registration failed.";
end if;
pragma(enable warning LiteralStringUsed);
I have confirmed that the script PDP_IG_CreateMenuItems does indeed run (by placing warning prompts at the beginning of the script), yet I receive no errors - but I see no menu item either.
The command does have display text, and I've tried using the product Id return from the Runtime_GetCurrentProductID() function (found that from Dave on another site).
Ideally I'd like the menu item under Transactions>>Sales - but that is trivial (CL_Sales_Transactions).
How can I get this menu item to show up? Any ideas?