Adding Shortcuts

All of the functions and constants used to add items to the Shortcut Bar are part of the syScBarObj form. When you use these functions or constants, you will need to use the “of form” qualifier to indicate they are part of the syScBarObj form.

If an integrating application adds shortcuts, it typically does so during installation. For example, the following code is an optional part of the installation procedure used for the sample integrating application.

if ask("Do you want to add shortcuts for the sample integrating application?", "Yes","No","") = ASKBUTTON1 then
	{Add shortcuts for every user in the system.}
	get first table SY_Users_MSTR;
	while err() <> EOF do
		call IG_Add_Shortcuts, 'User ID' of table SY_Users_MSTR;
		get next table SY_Users_MSTR;
	end while;
end if;

This code displays a dialog, asking whether shortcuts should be added. If the user clicks Yes, the IG_Add_Shortcuts procedure is run. This procedure adds shortcuts for two of the forms in the sample integrating application.

Name: IG_Add_Shortcuts

 

in string UserID;

local boolean result;
local integer node_id;
local integer res_id;

{Add the "Sample" folder to the Shortcut Bar.}
node_id = ScBar_AddFolder(scgPERSONAL of form syScBarObj, UserID, 0, "Sample") of form syScBarObj;

{Add the additional shortcuts.}
res_id = Resource_GetID(IG_PROD_ID, 2, "IG_Lead_Maintenance");
result = ScBar_AddDexForm(scgPERSONAL of form syScBarObj, UserID, node_id, "Lead Maintenance", res_id, IG_PROD_ID) of form syScBarObj;
res_id = Resource_GetID(IG_PROD_ID, 2, "IG_Lead_Inquiry");
result = ScBar_AddDexForm(scgPERSONAL of form syScBarObj, UserID, node_id, "Lead Inquiry", res_id, IG_PROD_ID) of form syScBarObj;



Documentation Feedback