Menu

Monday, August 8, 2011

How to restrict Certain Users to open Attachments?

Sample e-script for allowing a user with a certain responsibility to be able to open the attachments.

The following script on the Attachment list applet can be used to achieve the requirement.

function WebApplet_PreInvokeMethod (MethodName)
{
if (MethodName == "Drill"+"down")
{
var Resp as Array;
Resp = TheApplication().GetProfileAttrAsList("User Responsibilities");
for (var i=0; i<= Resp.Length(); i++)
{
if (resp[i] == "")
{
TheApplication().RaiseErrorText();
break;
}
}
return CancelOperation();
}

No comments:

Post a Comment