web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Engage with the Community
Unanswered

Complexity Assessment: Multi-Phase State Machine for Asset Location Tracking

(0) ShareShare
ReportReport
Posted on by
Hi Dynamics community,
 
I'm working on a D365 F&O customization for sequential processing of asset movements and I would appreciate your perspective on its complexity level.
I'm not looking for code (it's already developed), I'm just trying to understand if this scope is typical for a junior assignment or if I'm tackling something beyond my level.
Thanks for any insights!
 
Core Requirements (there're more, at least 35% more)

Data Processing:
 
Import Excel files (100-200 rows) with asset movement records
  • 5 movement codes (A, B, C, D, E) processed in specific order with interdependencies
  • All-or-nothing transaction processing (ttsBegin/ttsCommit with full rollback on any validation failure)
 
Movement Code Logic:
  • Code A: Creates base orders (status: Transferred)
  • Code B: Creates secondary orders (status: En Route), requires existing A
  • Code C: Updates B orders to Transferred status
  • Code D: Creates tertiary orders (En Route), requires A and B to be Transferred
  • Code E: Updates D orders to Transferred
 
Key Technical Challenges:
  • State Machine Implementation: Each order transitions between "En Route" ↔ "Transferred" based on ALL line-level statuses within that order
  • Dynamic Grouping Criteria: Orders are grouped by code + route + associated assets from base orders, but grouping logic differs per movement code
  • Orphan Record Handling: Multi-phase processing with iterative reprocessing of "orphan" records that initially lack their dependency pairs (e.g., C arrives before B exists)
  • Special Case Logic: One scenario requires E to update B directly AND create phantom C and D records in history table without actual C and D lines
  • 15+ Interdependent Validations: VIN existence, location chain validation, duplicate prevention, state transition rules, etc.
Movement Code Chain Validation
Each movement code must validate its route against its predecessor to ensure location continuity across three distinct order stages:
​
  • Stage 1: Initial Arrival (Code A)
    • Code A: Creates base order showing asset's initial arrival at port/entry location
  • Stage 2: First Transfer to Intermediate Warehouse (Codes B→C)
    • Code B: Creates first movement order - Validation required: B's origin MUST match A's destination
    • Code C: Confirms arrival at intermediate warehouse - Validation required: C's route must exactly match B's route
  • Stage 3: Final Transfer to Destination Warehouse (Codes D→E)
    • Code D: Creates second movement order - Validation required: D's origin MUST match where C confirmed arrival (B's destination)
    • Code E: Confirms final arrival - Validation required: E's route must exactly match D's route
Key Challenge: The system must maintain location chain integrity across all three order stages, rejecting any line that breaks the chain (e.g., D departing from a location where C never confirmed arrival).
​
 
Technical Context
  • Platform: D365 F&O (X++)
  • Timeline Given: 70 hours (the excel loading class was already present but not working properly)
 
My Questions
  • Would you classify this as Junior/Mid/Senior level complexity?
  • What's a realistic timeline for a mid-level D365 developer on something like this?
  • Is multi-phase orphan reprocessing a common pattern in D365, or is this unusually complex?
  • Any architectural recommendations? (Currently using single service class with switch-case logic per code)
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Engage with the Community

#1
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 8 Most Valuable Professional

#2
Layan Jwei Profile Picture

Layan Jwei 7 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 6 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans