Examples: ExistsForUserID()


The following example is the IG_CreateToolbars procedure in the sample integrating application. It uses the ExistsForUserID() function to verify whether the default toolbar set contains the toolbar for the sample. If it does not, the toolbar is added to the default set and cloned for all users.

local integer Seq;
local integer status;

{Add command bar only if it doesn't exist for the user}
if ExistsForUserID("",
		IG_PROD_ID,
		resourceid(form Command_IG_Sample), 
		resourceid(command CL_IG_Sample_CMDBAR of form Command_IG_Sample)) of form syCmdBarObj = true then
	abort script;
end if;

{Add the toolbar}
Seq = 1;
status = AddCommandBar("", 
	IG_PROD_ID, 
	resourceid(form Command_IG_Sample), 
	resourceid(command CL_IG_Sample_CMDBAR of form Command_IG_Sample),
	true, {visible by default}
	2, {row number}
	Seq,
	true) of form syCmdBarObj;


Documentation Feedback