pricerc wrote:That one has a className parameter as well as an AbstractPermissionName parameter?
(from Object Browser):
Public Function GetAbstractPermission(ClassName As String, AbstractPermissionName As String) As JiwaFinancials.Jiwa.JiwaApplication.Security.UserGroup.AccessLevels
Member of JiwaFinancials.Jiwa.JiwaApplication.JiwaStaff.clsStaff
Ahh - yes I forgot about that.
The ClassName is the class type for the FORM associated with the business logic. You'll find those in the SY_Forms table - but for sales orders it's either "JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm" or "JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.CreditNoteForm" (different permissions for credit notes).
Mike
EDIT: For completeness, the code is:
- Code: Select all
accessLevel = salesOrder.Manager.Staff.GetAbstractPermission("JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm", "sales order - email invoices")
EDIT #2:
And you can obtain the ClassName from the business logic itself, without having to inspect the SY_Forms table - use the ClientClassName property of the business logic:
So a more technically correct way:
- Code: Select all
accessLevel = salesOrder.Manager.Staff.GetAbstractPermission(salesOrder.ClientClassName, "sales order - email invoices")