Chapter 11: Advanced Placeholder Techniques

Chapter Objectives:

  • Master placeholder syntax for workflow fields and conditions

  • Understand where placeholders work and limitations

  • Use date calculations, text replacements, and user assignment placeholders

  • Distinguish between workflow field placeholders and scenario placeholders

  • Troubleshoot common placeholder issues

Prerequisites:

  • Understanding of basic workflow configuration (Chapters 5-6)

  • Familiarity with Business Central table and field structure

  • Completed at least one workflow implementation

  • Access to Rule_Engine_Placeholder_Usage_Guide.md for comprehensive reference

NOTE: This chapter focuses on workflow-specific placeholder applications. For complete placeholder reference including aggregate functions, old values, and advanced techniques, see Rule_Engine_Placeholder_Usage_Guide.md.

11.1. Placeholder Syntax Deep Dive

Basic Syntax: [TableNo:FieldNo]

Format:

[TableNo:FieldNo]

Example:

[18:2]

Finding Table and Field Numbers

Method 1: Lookup Placeholder FactBox


Method 2: Table Information Page

Navigation:
  1. Search: "Tables" in Business Central
  2. Find table name (e.g., "Customer")
  3. Note table number (e.g., 18)
  4. Open table metadata
  5. Find field name
  6. Note field number (e.g., 2)
  7. Construct: [18:2]

Method 3: Common Tables Reference

Table No.

Table Name

Common Usage

18

Customer

Customer workflows, contact info

23

Vendor

Vendor workflows

27

Item

Inventory, pricing workflows

36

Sales Header

Order/quote workflows

37

Sales Line

Line-level validations

38

Purchase Header

Purchase workflows

39

Purchase Line

Purchase line validations

81

Gen. Journal Line

Financial workflows

270

Bank Account

Banking workflows

5050

Contact

CRM workflows

5740

Transfer Header

Inventory transfer

11.2. Placeholders in Workflow Fields (Direct Usage)

Where Placeholders Work Directly

Placeholders resolve automatically in these Workflow Task fields:

1. Assigned to (Field 11)

Purpose: Dynamic user assignment
Placeholder Type: User ID or email lookup

Examples:
  Direct User ID:
    [36:29]           Salesperson Code from Sales Header
    
  Email Lookup:
    [18:102]          Customer E-Mail  system finds matching user
    [5050:102]

Example Configuration:

Workflow: Sales Order Review
Task: Review Order
  Assigned to: [36:29]

2. Contact No. (Field 15)

Purpose: Link task to specific contact
Placeholder Type: Contact number from source record

Prerequisites:
  - Activity Type must be "Interaction"
  - Source record must have contact field

Examples:
  Customer Primary Contact:
    [18:5050]         Customer."Primary Contact No."
    
  Vendor Primary Contact:
    [23:5052]         Vendor."Primary Contact No."
    
  Sales Header Contact:
    [36:5052]

3. Due Date (Field 8)

Purpose: Calculate dynamic due dates
Placeholder Type: Date field reference + optional calculation

Examples:
  Simple Field Reference:
    [36:5792]         Sales Header."Order Date"
    
  Field Plus Offset:
    [36:5792]+30D     Order Date + 30 days
    [36:5792]+1M      Order Date + 1 month
    [36:5792]+2W      Order Date + 2 weeks
    
  Multiple Offsets:
    [36:5792]+1M+5D   Order Date + 1 month + 5 days
    
  Customer Due Date:
    [18:54]

Example Configuration:

Workflow: Sales Order Processing
Task: Ship Order
  Due Date: [36:5792]

4. Critical Date (Field 9)

Purpose: Set escalation threshold
Placeholder Type: Date calculation (usually before due date)

Examples:
  Fixed Days Before Due:
    [36:5792]+5D      (If Due = Order Date + 7D, Critical = +5D)
    
  Percentage of Window:
    Conceptual only - not directly supported
    Workaround: Calculate manually

Common Pattern:
  Due Date: [36:5792]+7D
  Critical Date: [36:5792]

5. Description (Field 4)

Purpose: Dynamic task descriptions with context
Placeholder Type: Text replacement

Examples:
  Single Placeholder:
    "Review order [36:3]"
     "Review order SO-12345"
    
  Multiple Placeholders:
    "Call [18:2] about order [36:3]"
     "Call Alpine Ski House about order SO-12345"
    
  Contact Name:
    "Follow up with [5050:2]

Where Placeholders DON'T Work

Assigned to Team (Field 12):

Limitation: Team Code is fixed text only

Why: Team lookup expects exact Code[20] match
     Dynamic resolution not supported for Code fields

Workaround: Use Status Rules to change team dynamically
  Custom Status Rule:
    Field No: 12 (Assigned to Team)
    Value: SENIOR-TEAM
    Condition: [36:179]

11.3. Date Calculation Placeholders

Date Formula Syntax

Simple Field Reference:

[36:73]

Field Plus Offset:

[36:73]+30D           Shipment Date + 30 days
[36:73]+1M            Shipment Date + 1 month
[36:73]+2W            Shipment Date + 2 weeks
[36:73]+1Q            Shipment Date + 1 quarter
[36:73]

Field Minus Offset (Earlier Date):

[36:73]-7D            Shipment Date - 7 days (reminder before ship)
[36:73]-1W            Shipment Date - 1 week
[36:73]

Multiple Offsets:

[36:73]+1M+5D         Shipment Date + 1 month + 5 days
[36:73]+2W-3D         Shipment Date + 2 weeks - 3 days
[36:73]

Work Days (Business Days):

[36:73]

Period End Formulas


Date Calculation Examples

Example 1: Standard Lead Time

Business Requirement:
  Tasks due 10 business days after order placed

Configuration:
  Due Date: [36:5792]

Example 2: Staged Due Dates

Business Requirement:
  Multi-task workflow with staggered deadlines

Task 1 - Credit Check:
  Due Date: [36:5792]+1D        (Order Date + 1 day)
  
Task 2 - Inventory Allocation:
  Due Date: [36:5792]+3D        (Order Date + 3 days)
  
Task 3 - Shipping Prep:
  Due Date: [36:73]-1D          (Shipment Date - 1 day)
  
Task 4 - Final Review:
  Due Date: [36:73]

Example 3: Critical Date Calculation

Business Requirement:
  Critical threshold 80% through due date window

Configuration:
  Due Date: [36:5792]+10D       (Order Date + 10 days)
  Critical Date: [36:5792]

Date Placeholder Limitations

Limitation 1: NOT in Scenario Filter String

 Works:
  Workflow Task Field: Due Date = [36:73]+30D

 Does NOT Work:
  Scenario Filter String: [36:73]+30D < [TODAY]

Limitation 2: System Values

 Does NOT Work:
  Due Date: [TODAY]+30D
  
Reason: [TODAY]

11.4. Contact Assignment Placeholders

Contact Field Placeholders

Customer Contact:

[18:5050]             Customer."Primary Contact No."

Usage:
  Workflow Task:
    Activity Type: Interaction
    Contact No.: [18:5050]

Vendor Contact:

[23:5052]             Vendor."Primary Contact No."

Usage:
  Workflow: Vendor Onboarding
  Task: Welcome Call
    Activity Type: Interaction
    Template Code: PHONE CALL
    Contact No.: [23:5052]

Sales Header Contacts:

[36:5050]             Sales Header."Bill-to Contact No."
[36:5052]

Type Matching Requirements

Contact No. Field Requirements:

Field Type: Code[20]

Example Error Scenario:

Configuration:
  Contact No.: [18:102]    (Customer E-Mail field)
  
Problem:
  Field 102 = Text[80], not Code[20]
  Value = "john@alpine.com", not Contact No.
  
Result: Error when processing Interaction task

Correct Configuration:
  Contact No.: [18:5050]

11.5. Text Replacement Placeholders

Embedding Placeholders in Text

Single Placeholder:

Description: "Contact [18:2]

Multiple Placeholders:

Description: "Call [18:2] about order [36:3]

Contact Details:

Description: "Follow up with [5050:2] at [5050:102] regarding [36:3]

Formatting Considerations

Spacing:

Good: "Review order [36:3]"         "Review order SO-12345"
Bad:  "Review order[36:3]

Punctuation:

Good: "Call [18:2] about [36:3]."   "Call Alpine about SO-12345."
Good: "Order [36:3]

Multiple Lines (if field supports):

Description: 
"Task: Review order [36:3]
Customer: [18:2]
Due Date: [36:73]

Where Text Placeholders Work

** Workflow Task Fields**:

  • Description (Field 4)

  • Any custom text fields added to Workflow Task table

** Rule Engine Features** (see Rule Engine manual):

  • Message text

  • Notification body

  • Email body

  • Error message text

  • Confirmation text

** NOT Supported**:

  • Field captions (UI labels)

  • Page titles

  • Action names

11.6. Placeholders in Scenarios (Filter String)

IMPORTANT: Scenario placeholders work differently than workflow field placeholders.

Critical Distinction

Workflow Field Placeholders:

Location: Task fields (Assigned to, Due Date, Description)
Syntax: [TableNo:FieldNo]

Scenario Filter String Placeholders:

Location: Scenario "Filter String" field
Syntax: [TableNo:FieldNo]

Cross-Table Field Comparisons

Use Case: Compare field from source record to field from related record

Example: Customer Credit Limit vs. Balance:

Scenario Configuration:
  Table ID: 18 (Customer)
  Field No.: 5700 (Credit Limit (LCY))
  Filter String: >[18:5702]
  
Meaning: Credit Limit > Balance
  [18:5700] is the field being validated
  [18:5702]

Linked Table Requirement

For Cross-Table Comparisons:

Requirement: Must configure Linked Table in validation

Steps:
  1. Create Linked Table entry
  2. Define relationship between tables
  3. Use placeholder in Filter String
  
Example: Compare Sales Order Amount to Customer Credit Limit
  Scenario on Sales Header (36):
    Linked Table: 18 (Customer)
    Relationship: Sales Header."Sell-to Customer No." = Customer."No."
    
  Scenario Configuration:
    Field No.: 179 (Amount Including VAT)
    Filter String: <[18:5700]

NOTE: For complete Linked Table configuration, see Rule Engine User Manual Section 8 and Workflow Manual Section 5.6.

Scenario Placeholder Limitations

CANNOT Use:

1. Date Calculations:

 Filter String: >[36:5792]

2. System Values:

 Filter String: <[TODAY]
Reason: System values don't work in scenarios
Workaround: Use Condition line with [TODAY]

3. Text Concatenation:

 Filter String: [18:2]+' - '+[18:5]

11.7. User Assignment Placeholders

Direct User ID Assignment

Simple User ID Field:

Placeholder: [36:29]    (Sales Header."Salesperson Code")

Usage:
  Assigned to: [36:29]

Email Lookup Assignment

How Email Lookup Works:

Step 1: Placeholder resolves to email address
  Example: [18:102]

Common Email Field Placeholders:

Customer Email:
  [18:102]              Customer."E-Mail"

Vendor Email:
  [23:102]              Vendor."E-Mail"

Contact Email:
  [5050:102]            Contact."E-Mail"

Sales Header Contact:
  [36:???]

Dynamic Assignment Patterns

Pattern 1: Assign to Salesperson:

Workflow: Sales Order Review
Task: Credit Check
  Assigned to: [36:29]

Pattern 2: Assign to Customer's Account Manager:

Workflow: Customer Issue Resolution  
Task: Contact Customer
  Assigned to: [18:29]    (Customer."Salesperson Code")
  Contact No.: [18:5050]

Pattern 3: Email-Based Assignment:

Workflow: Vendor Onboarding
Task: Welcome Call
  Assigned to: [23:102]

11.8. Placeholder Troubleshooting

Common Syntax Errors

Error 1: Missing Brackets:

 Wrong: 18:2
 Correct: [18:2]

Error 2: Wrong Separator:

 Wrong: [18.2] or [18-2] or [18 2]
 Correct: [18:2]

Error 3: Missing Colon:

 Wrong: [182]
 Correct: [18:2]

Error 4: Extra Spaces:

 Wrong: [ 18:2 ] or [18 : 2]
 Correct: [18:2]

Type Mismatch Issues

Error: Text Field in Date Field:

Problem:
  Due Date: [18:2]      (Customer Name = Text)
  
Symptom: Error at task creation
  "Cannot convert text to date"
  
Solution:
  Use actual date field: [18:54]

Error: Number Field in Text Field:

Problem:
  Description: "Amount is [36:179]

Field Not Found Errors

Error: Wrong Table Number:

Problem:
  [17:2]

Error: Wrong Field Number:

Problem:
  [18:999]

Resolution Testing Strategies

Strategy 1: Test with Known Values:

Steps:
  1. Create test workflow
  2. Configure placeholder: [18:2]

Strategy 2: Use Simple Placeholders First:

Progression:
  1. Start: [18:2] (simple text field)
  2. Test: Verify works
  3. Add: [18:2]

Strategy 3: Check Validation Log:


"Invalid Placeholder" Indicators

In UI:

  • Field shows literal placeholder text instead of value

  • Error message at task creation

  • Task created but field blank

In Validation Log:

  • Entry shows placeholder resolution failed

  • Error message indicates syntax or field issue

Resolution Steps:

1. Check placeholder syntax ([TableNo:FieldNo]

This completes Chapter 11 on Advanced Placeholder Techniques, focusing on workflow-specific applications while cross-referencing the Rule Engine manual for comprehensive placeholder coverage including aggregate functions, old values, and complex scenarios.

Chapter 11 Complete: Advanced Placeholder Techniques

Get Your FREE Dynamics 365 Demo

Transform your business operations with Microsoft Dynamics 365 Business Central

Experience the transformative power of Microsoft Dynamics 365 Business Central for yourself! Request a free demo today and see how our solutions can streamline your operations and drive growth for your business.

Our team will guide you through a personalized demonstration tailored to your specific needs. This draft provides a structured approach to presenting Qualia Tech's offerings related to Microsoft Dynamics 365 Business Central while ensuring that potential customers understand the value proposition clearly.

Areas Of Interest

Please read and confirm the following:

*Note: Fields marked with * are mandatory for processing your request.

*Note: Fields marked with * are mandatory for processing your request.

© 2024 Qualia. All rights reserved

QUALIA Technik GmbH

info@qualiatechnik.de

17, Heinrich-Erpenbach-Str. 50999 Köln

© 2024 Qualia. All rights reserved

QUALIA Technik GmbH

info@qualiatechnik.de

17, Heinrich-Erpenbach-Str. 50999 Köln

© 2024 Qualia. All rights reserved

QUALIA Technik GmbH

info@qualiatechnik.de

17, Heinrich-Erpenbach-Str. 50999 Köln

© 2024 Qualia. All rights reserved

QUALIA Technik GmbH

info@qualiatechnik.de

17, Heinrich-Erpenbach-Str. 50999 Köln