Domain 7 β€” Module 1 of 3 33%
26 of 28 overall
Domain 7: Implement Security and Optimize Performance Free ⏱ ~16 min read

Security Roles, Duties & XDS Policies

Master the F&O security architecture β€” roles, duties, privileges, permissions, entry points β€” and implement row-level security with Extensible Data Security (XDS) policies.

How does F&O security work?

Simple explanation

Think of a company building with key cards.

Your role (employee, manager, executive) determines which floors you can access. Each floor has duties β€” things you’re responsible for (like β€œprocess payroll” or β€œapprove invoices”). Each duty requires specific privileges β€” the actual actions you can perform (like β€œview employee records” or β€œpost journal entries”). And each privilege maps to a specific door (menu item, button, or form) you can open.

F&O stacks these layers: Role β†’ Duty β†’ Privilege β†’ Permission β†’ Securable Object. You never give a user direct access to a form β€” you assign them a role, and the role’s duties and privileges determine what they can see and do.

The security hierarchy

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  USER (e.g. Elena Vasquez)                              β”‚
β”‚  └── ROLE: Production Manager                           β”‚
β”‚       β”œβ”€β”€ DUTY: Maintain production orders               β”‚
β”‚       β”‚    β”œβ”€β”€ PRIVILEGE: Create production order         β”‚
β”‚       β”‚    β”‚    └── PERMISSION: ProdTable (Create)       β”‚
β”‚       β”‚    β”‚    └── PERMISSION: ProdTableListPage (Read) β”‚
β”‚       β”‚    └── PRIVILEGE: View production schedule        β”‚
β”‚       β”‚         └── PERMISSION: ProdSchedule (Read)      β”‚
β”‚       └── DUTY: Inquire into production status           β”‚
β”‚            └── PRIVILEGE: View production status          β”‚
β”‚                 └── PERMISSION: ProdStatus form (Read)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Each layer explained

Five layers β€” from broadest (role) to most granular (securable object)
LayerWhat it representsAOT elementExample
Security RoleA job function assigned to usersSecurityRoleProductionManager, AccountsPayableClerk
DutyA business responsibility (group of privileges)SecurityDutyMaintainProductionOrders, InquireVendorInvoices
PrivilegeAccess to specific entry points at a given levelSecurityPrivilegeProdTableCreate (Create access to ProdTable menu)
PermissionExact access level on a securable objectPart of privilege definitionRead, Update, Create, Delete, or Invoke
Securable ObjectThe actual UI or service entry pointMenu item, service op, tableProdTableListPage (menu item display)
Exam tip: Duties are the key design unit

When the exam asks about security design, duties are the most important layer:

  • Roles are assigned to users but are just containers for duties
  • Privileges are too granular for business discussion
  • Duties represent business responsibilities that auditors understand

Best practice: design duties first (based on business processes), then compose roles from duties. While you CAN assign privileges directly to roles, best practice is to go through duties for auditability and separation of duties (SoD) compliance.

Creating custom security elements

Custom roles

StepDetail
1In VS, right-click project β†’ Add β†’ New Item β†’ Security Role
2Name it descriptively: PFProductionSupervisor
3Add duties (not individual privileges) to the role
4Set the role’s context β€” which legal entities it applies to (if constrained)
5Deploy and assign to users in System Administration β†’ Users

Custom duties

StepDetail
1Add β†’ New Item β†’ Security Duty
2Name: PFMaintainQualityOrders
3Add privileges to the duty
4Set the duty’s identifier (used for SoD conflict detection)

Custom privileges

StepDetail
1Add β†’ New Item β†’ Security Privilege
2Name: PFQualityOrderCreate
3Add entry point permissions: select menu items, set access level
4Optionally add table permissions for direct data access

Entry point permissions

Entry points are the doors into F&O β€” each privilege specifies which doors it opens and at what level:

Entry point typeExampleAccess levels
Menu item displayForms and list pagesRead, Update, Create, Delete
Menu item outputReports (SSRS)Read (view/run the report)
Menu item actionBatch jobs, processesRead (trigger the action)
Service operationWeb services, ODataInvoke
Scenario: Elena designs PacificForge security

Elena works with compliance officer Kenji to design the security model for PacificForge’s production module:

RoleDutiesKey privileges
PF Production SupervisorMaintain production orders, View production KPIs, Approve quality ordersCreate/update prod orders, view dashboards, approve quality
PF Production OperatorRecord production output, View work instructionsUpdate route transactions, read-only on BOM
PF Quality InspectorMaintain quality orders, Record test resultsCreate quality orders, update test measurements
PF Production ViewerInquire into production statusRead-only on all production forms

β€œNotice how the Operator can record output but can’t create or delete production orders,” Elena tells Sophie. β€œThat’s least privilege β€” they get exactly what their job requires, nothing more.”

Extensible Data Security (XDS) β€” row-level security

The role/duty/privilege model controls which forms and actions a user can access. But what about which records they can see? That’s where XDS comes in.

What XDS does

XDS applies automatic WHERE clauses to queries, filtering data based on the user’s context. A regional manager sees only their region’s data β€” even though they have access to the same forms as other managers.

Without XDS:    SELECT * FROM SalesTable
                β†’ Returns ALL sales orders (all regions)

With XDS:       SELECT * FROM SalesTable
                WHERE SalesTable.Region = 'Pacific'
                β†’ Returns only Pacific region orders
                (filter injected automatically by XDS)

XDS policy components

ComponentPurposeExample
PolicyThe top-level containerPFRegionalDataPolicy
Constrained tableThe table being filteredSalesTable, CustTable
ContextWhat determines the filter valueCurrent user’s role, current company, custom context
Policy queryThe filter logic (WHERE clause)SalesTable.Region = getCurrentUserRegion()
Context typeRoleBased (most common) or Application contextRole-based filters by role membership; application by runtime value

Building an XDS policy

// XDS Policy definition in AOT
// Policy: PFRegionalSalesPolicy
// Constrained table: SalesTable
// Context type: RoleBased
// Primary table: SalesTable

// The policy query joins SalesTable to a mapping table
// that links users to regions. When the policy is active,
// every query against SalesTable automatically includes:
// EXISTS (SELECT 1 FROM UserRegionMapping
//         WHERE UserRegionMapping.Region = SalesTable.SalesRegion
//         AND UserRegionMapping.UserId = currentUserId())
Scenario: Elena implements regional data security

PacificForge has three regional offices (Pacific, Americas, Europe). Each regional sales manager should only see their region’s customers and orders.

Elena’s XDS implementation:

  1. Creates a UserRegionMapping table linking user IDs to regions
  2. Creates an XDS policy PFRegionalDataPolicy with:
    • Constrained tables: SalesTable, CustTable, SalesLine
    • Context: RoleBased (applies when user has the Regional Sales Manager role)
    • Query: EXISTS join to UserRegionMapping where Region matches
  3. Assigns the policy to the PF Regional Sales Manager role

Result: when a Pacific manager opens the Sales Orders list, they automatically see only Pacific region orders. The WHERE clause is injected invisibly β€” no code changes needed on any form.

β€œThe beauty is that every form, every report, every export that touches SalesTable is automatically filtered,” Elena tells DBA Harpreet. β€œWe don’t have to modify each one individually.”

Exam tip: XDS vs form-level filtering

The exam may present scenarios where you need to choose between XDS and form-level filtering:

  • XDS β€” automatic, applies everywhere (forms, reports, exports, services), enforced at the database query level. Use for security requirements.
  • Form-level filtering β€” manual, applies only to that form, can be bypassed. Use for convenience/UX, not security.

If the requirement says β€œusers must NOT be able to see other regions’ data” β†’ XDS (security). If it says β€œdefault the form to the user’s region” β†’ form filter (convenience).

Security diagnostics

Troubleshooting access issues

ToolPurposeLocation
Security diagnosticsTraces why a user can or can’t access somethingSystem Administration β†’ Security β†’ Security diagnostics
View permissionsShows all effective permissions for a userUser details β†’ View permissions
Role assignmentsLists all roles assigned to a userSystem Administration β†’ Users β†’ select user β†’ Assign roles
Security configurationVisualises the role β†’ duty β†’ privilege treeSystem Administration β†’ Security β†’ Security configuration
Segregation of dutiesDetects conflicting duties assigned to the same userSystem Administration β†’ Security β†’ Segregation of duties
Scenario: Debugging a missing menu item

Sophie reports that a production operator can’t see the β€œRecord Output” menu item. Elena’s debugging steps:

  1. Check role assignment β€” is the user assigned the PF Production Operator role? βœ… Yes
  2. Check duty β€” does the role include the β€œRecord production output” duty? βœ… Yes
  3. Check privilege β€” does the duty include the privilege for the menu item? ❌ Missing!
  4. Fix β€” add the ProdRouteTransCreate privilege to the duty
  5. Verify β€” re-check using Security Diagnostics β†’ user can now see the menu item

β€œAlways start from the user and work down the chain,” Elena advises. β€œRole β†’ Duty β†’ Privilege β†’ Entry Point. The break is almost always a missing privilege.”

Segregation of duties (SoD)

SoD rules prevent users from having conflicting responsibilities β€” like β€œcreate vendor” AND β€œapprove vendor payments” (fraud risk).

ConceptDetail
SoD ruleDefines two duties that should never be assigned to the same user
SoD conflictsSystem reports violations when roles create conflicts
ResolutionSplit duties across different roles, or document an exception
Audit trailSoD violations are logged for compliance auditing

Question

What are the five layers of the F&O security hierarchy, from broadest to most granular?

Click or press Enter to reveal answer

Answer

Role β†’ Duty β†’ Privilege β†’ Permission β†’ Securable Object. Roles are assigned to users. Duties represent business responsibilities. Privileges grant access to entry points at specific levels. Permissions define exact access (Read/Create/Update/Delete/Invoke). Securable objects are the actual resources (menu items, service operations).

Click to flip back

Question

What is XDS (Extensible Data Security) and when do you use it?

Click or press Enter to reveal answer

Answer

XDS provides row-level security by automatically injecting WHERE clauses into queries. It filters data based on user context (e.g. region, department). Use XDS when users need access to the same forms but should only see a subset of records. It applies everywhere β€” forms, reports, exports, services β€” without modifying each one individually.

Click to flip back

Question

Why should you design duties before roles in F&O security?

Click or press Enter to reveal answer

Answer

Duties represent business responsibilities that auditors understand (e.g. 'Maintain vendor invoices'). They're the key unit for Segregation of Duties (SoD) compliance. Design duties based on business processes, then compose roles from duties. Never assign privileges directly to roles β€” always go through duties for auditability.

Click to flip back

Question

How do you troubleshoot a user who can't see a menu item in F&O?

Click or press Enter to reveal answer

Answer

Work down the security chain: 1) Check role assignment (User β†’ Assign roles). 2) Check the role contains the correct duty. 3) Check the duty contains the correct privilege. 4) Check the privilege has an entry point permission for the menu item with the correct access level. Use Security Diagnostics for automated tracing.

Click to flip back

Question

What is the difference between RoleBased and Application context in XDS?

Click or press Enter to reveal answer

Answer

RoleBased context applies the XDS policy only when the user is assigned a specific security role. Application context applies based on a runtime value (e.g. current company, current warehouse). RoleBased is most common β€” it lets you filter data for specific roles while leaving unrestricted access for admin roles.

Click to flip back


Knowledge Check

Elena needs to ensure that PacificForge's regional sales managers can only see customer records from their own region. The filter must apply everywhere β€” forms, reports, and exports. What should she implement?

Knowledge Check

Compliance officer Kenji needs to ensure no single user can both create vendors AND approve vendor payments. Which security feature should Elena configure?

Knowledge Check

Sophie creates a custom privilege for a new report but users still can't see it. The privilege has the correct menu item entry point. What is the most likely missing step?

Knowledge Check

Elena is choosing the correct access level for a privilege that allows production operators to view (but not modify) production orders. Which entry point access level should she set?

Next up: Performance, Caching & Set-Based Operations β€” table caching strategies, temp tables, set-based patterns, and concurrency control in X++.