Advanced Cloud Security Documentation
Index

Handle Conflict Fields

When implementing field-level security, you may encounter fields that already have visibility or editability expressions defined in Business Central or other extensions. These are called Conflict Fields. This guide explains how to identify and resolve them.

What is a Conflict Field?

A conflict field is a page control (field or action) that already has:

  • A Visible property expression
  • An Editable property expression
  • An Enabled property expression

These existing expressions conflict with ACS's ability to control the field because AL allows only one expression per property.

Why Conflicts Occur

Business Central and extensions often include conditional logic like:

Visible = SalesSetup."Credit Limit Warning"
Editable = NOT Rec.Posted
Enabled = HasPermission

When ACS tries to add its own visibility control, it cannot simply override these expressions—it must incorporate them.

Accessing Conflict Fields

  1. Open Advanced Cloud Security from the Tell Me search
  2. Click Handle Conflict Fields in the Build phase column
  3. The Conflict Fields page opens

Understanding the Conflict Fields Page

The page shows all fields with existing expressions:

Column Description
Page No. The page where the conflict exists
Kind Control type (Field, Action, etc.)
Name The control name
Used On Features How many security features use this field
Enabled Existing Enabled expression
Visible Existing Visible expression
Editable Existing Editable expression

Conflict Resolution Strategies

Strategy 1: Leave As-Is

If a field has an existing expression but no security features need to control it:

  • Leave the conflict unresolved
  • The field will behave according to its original expression
  • ACS will not modify this field

Strategy 2: ACS Overrides

If you want ACS to completely control the field:

  1. Select the conflict field
  2. Choose to override the original expression
  3. ACS security will take full control
  4. Original business logic is replaced

Warning: This may disable intended business functionality.

ACS can combine the original expression with security rules:

  1. Select the conflict field
  2. Choose combined mode
  3. ACS generates: OriginalExpression AND ACSSecurityResult
  4. Both conditions must be true for the field to show/be editable

Example: Combined Logic

Original expression:

Visible = SalesSetup."Show Credit Info"

With ACS security:

Visible = SalesSetup."Show Credit Info" AND ACSVisible_CreditInfo

Result: Field shows only if BOTH:

  • Setup says to show it
  • User has ACS permission

Linking Conflicts to Features

You can associate conflict fields with specific security features:

  1. Select the conflict field
  2. Click Link to Feature
  3. Select the security feature
  4. The conflict resolution applies to that feature

Common Conflict Scenarios

Scenario 1: Posted Document Fields

Many fields are read-only when a document is posted:

Editable = NOT Rec.Posted

Resolution: Use combined logic so the field is:

  • Not editable when posted (business rule)
  • Not editable when user lacks permission (security rule)

Scenario 2: Setup-Controlled Visibility

Some fields appear based on setup:

Visible = GeneralLedgerSetup."Enable Dimensions"

Resolution: Use combined logic to respect both:

  • Setup configuration
  • User security permissions

Scenario 3: Permission-Based Visibility

Some fields check user permissions:

Enabled = HasPermission

Resolution: Use combined logic to layer ACS security on top of existing permission checks.

Detecting New Conflicts

Conflicts can appear when:

  • You upgrade Business Central
  • You install new extensions
  • Extensions are updated

Checking for New Conflicts

  1. Periodically open Handle Conflict Fields
  2. Look for unresolved conflicts
  3. Determine if they affect your security features
  4. Resolve as appropriate

Conflict Resolution Workflow

Step 1: Review All Conflicts

Open the Conflict Fields page and review each entry:

  • Understand what the original expression does
  • Determine if it's business-critical logic
  • Identify if any security features need this field

Step 2: Prioritize

Focus first on:

  1. Fields used by security features
  2. Fields with complex expressions
  3. Critical business pages

Step 3: Resolve

For each relevant conflict:

  1. Choose a resolution strategy
  2. Link to appropriate security features
  3. Document your decision

Step 4: Test

After resolving conflicts:

  1. Regenerate the extension
  2. Test affected pages
  3. Verify both security and business logic work

Best Practices

Document Your Decisions

Keep records of:

  • Why you chose each resolution strategy
  • What the original expression did
  • Potential impacts of the resolution

Prefer Combined Logic

Combined logic preserves business functionality while adding security. Only override when absolutely necessary.

Review After Updates

After Business Central or extension updates:

  1. Check for new conflict fields
  2. Verify existing resolutions still work
  3. Update as needed

Test Thoroughly

Conflict resolution can have unexpected impacts:

  • Test with users who have the feature assigned
  • Test with users who don't have the feature assigned
  • Test all related business processes

Troubleshooting

Field Behavior Unexpected

If a field doesn't behave as expected after conflict resolution:

  1. Check the resolution strategy used
  2. Verify the security feature assignment
  3. Review the original expression
  4. Test with combined logic

Extension Won't Compile

If the generated extension has errors:

  1. Check for invalid conflict resolutions
  2. Verify expression compatibility
  3. Contact support if issues persist

Business Logic Broken

If business functionality stops working:

  1. Change from "Override" to "Combined"
  2. Regenerate the extension
  3. Verify business logic is restored