Examples: ButtonsExistForProduct()


The following example is a portion of the IG_CreateToolbarItems procedure in the sample integrating application. It uses the ButtonsExistForProduct() function to verify whether the toolbar buttons have been already been added to the syCmdBarButtons table. If they have not, the commands are added.

local integer status;
local integer Seq;

{Add default items to the toolbar if they don't already exist}
if ButtonsExistForProduct(IG_PROD_ID) of form syCmdBarBtnObj = true then
	abort script;
end if;

Seq = 1;
status = AddCommandToCmdBar(IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command CL_IG_Sample_CMDBAR of form Command_IG_Sample),
	Seq,
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command IG_Lead_Maintenance of form Command_IG_Sample),
	true, {available for all users}
	MENULOAD_TOTABLE);

increment Seq;

status = AddCommandToCmdBar(IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command CL_IG_Sample_CMDBAR of form Command_IG_Sample),
	Seq,
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command IG_Lead_Inquiry of form Command_IG_Sample),
	true, {available for all users}
	MENULOAD_TOTABLE);


Documentation Feedback