[X++] SysEntryPointAttribute parameter

When writing custom services an often used attribute is the SysEntryPointAttribute to decorate the service entry method to be called from the framework.

This attribute takes one argument of type boolean.

[SysEntryPointAttribute(false)]

The AIF Document Service classes also have this attribute set to true by default when generating via the wizard.

But what does this parameter control?

There is a good reference on TechNet:

true
[SysEntryPointAttribute(true)]

Indicates authorization checks are performed on the calling user for all tables accessed by the method.

false
[SysEntryPointAttribute(false)]

Indicates authorization checks are not performed on any tables accessed by the method.

Conclusion

When setting the parameter to false, only the access rights from the menu item or calling instance are checked, not for every table the method will access.
So sometimes settings this parameter to true will cause trouble when the user has the respective roles and duties assigned but not explicit rights for certain tables.

A good default value will be to set it to false.

Robin

Software Engineer / Application Developer

Subscribe to robsCode

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!