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:
Example:
Finding Table and Field Numbers
Method 1: Lookup Placeholder FactBox
Method 2: Table Information Page
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)
Example Configuration:
2. Contact No. (Field 15)
3. Due Date (Field 8)
Example Configuration:
4. Critical Date (Field 9)
5. Description (Field 4)
Where Placeholders DON'T Work
Assigned to Team (Field 12):
11.3. Date Calculation Placeholders
Date Formula Syntax
Simple Field Reference:
Field Plus Offset:
Field Minus Offset (Earlier Date):
Multiple Offsets:
Work Days (Business Days):
Period End Formulas
Date Calculation Examples
Example 1: Standard Lead Time
Example 2: Staged Due Dates
Example 3: Critical Date Calculation
Date Placeholder Limitations
Limitation 1: NOT in Scenario Filter String
Limitation 2: System Values
11.4. Contact Assignment Placeholders
Contact Field Placeholders
Customer Contact:
Vendor Contact:
Sales Header Contacts:
Type Matching Requirements
Contact No. Field Requirements:
Example Error Scenario:
11.5. Text Replacement Placeholders
Embedding Placeholders in Text
Single Placeholder:
Multiple Placeholders:
Contact Details:
Formatting Considerations
Spacing:
Punctuation:
Multiple Lines (if field supports):
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:
Scenario Filter String Placeholders:
Cross-Table Field Comparisons
Use Case: Compare field from source record to field from related record
Example: Customer Credit Limit vs. Balance:
Linked Table Requirement
For Cross-Table Comparisons:
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:
2. System Values:
3. Text Concatenation:
11.7. User Assignment Placeholders
Direct User ID Assignment
Simple User ID Field:
Email Lookup Assignment
How Email Lookup Works:
Common Email Field Placeholders:
Dynamic Assignment Patterns
Pattern 1: Assign to Salesperson:
Pattern 2: Assign to Customer's Account Manager:
Pattern 3: Email-Based Assignment:
11.8. Placeholder Troubleshooting
Common Syntax Errors
Error 1: Missing Brackets:
Error 2: Wrong Separator:
Error 3: Missing Colon:
Error 4: Extra Spaces:
Type Mismatch Issues
Error: Text Field in Date Field:
Error: Number Field in Text Field:
Field Not Found Errors
Error: Wrong Table Number:
Error: Wrong Field Number:
Resolution Testing Strategies
Strategy 1: Test with Known Values:
Strategy 2: Use Simple Placeholders First:
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:
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
0 Code Advanced Workflow
>
Chapter 01 : Introduction and Overview
>
Chapter 02: Getting Started
>
Chapter 03: Core Concepts and Terminology
>
Chapter 04: Tutorial - Your First Workflow
>
Chapter 05: Configuring Workflow Triggers (Initiated By Rules)
>
Chapter 06: Designing and Configuring Workflow Tasks
>
Chapter 07: Configuring Status Rules and Task Logic
>
Chapter 08: Managing Teams and Users
>
Chapter 09: Processing Workflow Tasks
>
Chapter 10: Monitoring and Reporting
>
Chapter 11: Advanced Placeholder Techniques
>
Chapter 12: Complex Workflow Patterns
>
Chapter 13: Integration with Business Central
>
Chapter 14: Troubleshooting and Maintenance
>
Chapter 15: Field and Table Reference
>
Chapter 16: Formula Reference
>
Chapter 17: Glossary and Index
>
Chapter 18: 20 Real-World Workflow Examples
Related Posts
Chapter 18: 20 Real-World Workflow Examples
Chapter Purpose: This chapter provides 20 complete, production-ready workflow implementations spanning multiple Business Central modules. Each example includes business context, measurable benefits, complete configuration steps, testing procedures, and troubleshooting guidance.
Chapter 17: Glossary and Index
Activity Type: Classification of how a workflow task is processed. Options: Manual, Conditional, Interaction, Job Queue, Approval Workflow. Assigned to: User ID who should process the task. Supports placeholders for dynamic assignment. Assigned to Team: Team code for team-assigned tasks. Users see tasks for their teams in "My Teams" view.
Chapter 16: Formula Reference
Chapter Objectives: Master date formula syntax Understand comparison operators Learn validation formula patterns Apply formulas to real scenarios
