Examples: Exists() -- Security Task

The following example uses the Exists() function to indicate whether the CARD_IGSAMPLE_01 security task exists. If it does not, the security task is added.

local string taskID;

taskID = "CARD_IGSAMPLE_01";
if Exists(taskID) of form sySecurityTask = false then
	{Task does not exist, so create it}
	status = CreateSecurityTask(taskID, {ID}
		"Maintain leads", {Name}
		"Maintain lead information and setup.", {Description}
		CATEGORY_SALES of form sySecurityRoleEntry)
		of form sySecurityTask;
end if;

Documentation Feedback