Monday, September 2, 2013

Setting SysEntryPointAttribute for Services [AX 2012]

The SysEntryPointAttribute indicates what authorization checks are performed for a method that is called on the server. This attribute must be set for all service operations. For more information about how to set attributes on X++ methods, see Syntax for Attribute Classes.
The AIF Document Service Wizard automatically decorates service operations with [SysEntryPointAttribute(true)]. When you develop custom services you must use theSysEntryPointAttribute to decorate each service operation.
Setting :
The following table describes the possible values for the constructor of the SysEntryPointAttribute class.
[SysEntryPointAttribute(true)] - Indicates authorization checks are performed on the calling user for all tables accessed by the method.

[SysEntryPointAttribute(false)] - Indicates authorization checks are not performed on any tables accessed by the method.

Example :
[AifDocumentCreateAttribute, SysEntryPointAttribute(true)]
public AifEntityKeyList create(CustCustomer _custCustomer)
{
    return this.createList(_custCustomer);
}

reference : http://technet.microsoft.com/en-us/library/hh801193.aspx

No comments:

Post a Comment