Examples: Security()


The following script examines the IG_Contact_History form to verify that the current user has access. Notice that a local variable containing the product ID is passed into the function.

local integer dict_ID = 3333;
local integer result;

result = Security(dict_ID, FORMTYPE, resourceid(form IG_Contact_History));

The following script examines the security status of the Account_Lookup form in the Dynamics dictionary to find out whether an alternate version of the form is being used. If an alternate form is being used, the product ID for the dictionary is returned and displayed.

local integer dict_ID;
local integer result;

dict_ID = 0;
result = Security(dict_ID, FORMTYPE, resourceid(form Account_Lookup));

if result = 0 then
	if dict_ID = 0 then
		{Acess to the original version}
		warning "Access to Original";
	else
		{Access to an alternate version}
		warning "Access to alternate in dictionary with ID: " + str(dict_ID);
	end if;
else
	warning "Access denied.";
end if;


Documentation Feedback