Utility.CheckSecurity(SecurityNumber)

.CheckSecurity() returns the currently logged in user's permission status for a given DEACOM permission. This returns true if the user has the specified DEACOM permission either from the user's group or from the user's permissions.

Note: The SecurityNumber is not the easiest number to find in DEACOM. I would recommend going to System > Maintenance > User Group Master Security and adding the sc_id column to this grid. The sc_id is the SecurityNumber. You could also add this column to the Edit Access grids in System > Maintenance > User Groups, or Users.

Applies To

Properties and Methods

None

Available

The .CheckSecurity(SecurityNumber) method is available in:

  • 15.03.016
  • All newer builds

Type

Boolean

Syntax

Utility.CheckSecurity(SecurityNumber);

Parameters

Parameter

Required

Description

SecurityNumber

Yes

The ID representing a DEACOM permission. This can be found by going to any of the security grids and either clicking on show all fields, or by adding the sc_id column to the grid layout.

Example

Event.Form.MessageBox('Sales orders -- access order entry (146): ' + Utility.CheckSecurity(146) +

'\nSales orders -- change facility (113): ' + Utility.CheckSecurity(113) +

'\nBill-to companies -- edit (14): ' + Utility.CheckSecurity(14) +

'\nShip-to companies -- edit (50): ' + Utility.CheckSecurity(50));

 

/* Expected Prompt Response:

Sales orders -- access order entry (146): true

Sales orders -- change facility (113): false

Bill-to companies -- edit (14): false

Ship-to companies -- edit (50): true

*/