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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

(0) ShareShare
ReportReport
Posted on by

can anyone give me an example of Workflow that includes "SubWorkflow" I didn't find a situation that i can use it for, and if I wanna select SubWorkflow from another module, the document key Field DropDown selection will be empty and there is no data to select to continuo the process, So i need an example where i can use SubWorkflow in Dynamics 365 Finance and Operations Workflows.

4237.Sub_5F00_WF-error.jpg

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,571 Super User 2026 Season 1 on at

    Hi Deya,

    Can you elaborate on what you want to achieve? Which workflow type do you want to link with what sub workflow?

    Probably you can read the AX2012 documentation as it is still the same: docs.microsoft.com/.../configure-a-subworkflow

  • Deya Saleh Profile Picture
    on at

    Let's say that i need to do a loan items work flow and i wanna use subworkflow to go or initiate a workflow on procurement,

    My question here can i do that?

    The other question if i can't. Why this subworkflow is existed if i can't use it on another workflow with no relation between them!!

  • Suggested answer
    Junaid Idrees Profile Picture
    on at

    Hi Deya,

    Sorry your business case is not very clear. Why exactly you want to use Subworkflow. Would appreciate if you can share some more detail about your business case to understand your requirement.

    WHERE TO USE SUBWORKFLOW: When you have many conditions and approvals in one workflow, let's say PO has 100 of lines and each line has different conditions and approval hierarchy, In that case, we use subworkflow.

    Please find the below link to configure subworkflow in AX 2012.

    dynamicbusinesssolutions.ru/.../d04b9e99-1c47-4cb4-8664-1ebc60c7a624.htm

  • Deya Saleh Profile Picture
    on at

    That means it's for simplification if i have a complex workflow,

    The situation that i said earlier in details is, that i need to lend an item to an employee and on one of the "loan item workflow" steps a manual decision if i have this item on stock or i have to buy one. So if i have to buy one, can i select a subworkflow the workflow steps includes a PO workflow for that item to initiate it automatically??

    You said it's for complex workflow, can i use a subworkflow that is different than the workflow it self (( parent Purchase requisition Workflow & Purchase order Subworkflow)) in the same workflow.?? 

  • Suggested answer
    Junaid Idrees Profile Picture
    on at

    Hi Deya,

    Yes You can do that. Parent would be loaned item workflow and PR or PO can be setup as subworkflow to purchase an item but the thing is someone has to create a purchase order with all details (Product, Qty, price, vendor) then you can trigger that automatically as subworkflow. PO Details will not be filled up automatically. How would system know to which vendor you want to issue that PO.

    If you want to automate complete process then you have to use power automate and logicapps.

    Hope it clarifies.

  • Deya Saleh Profile Picture
    on at

    can you tell me how to connect them in this case ?

    how will someone create a PO with the details and that PO is the same in Subworkflow !!

    I can't connect that in my head.

  • Suggested answer
    Junaid Idrees Profile Picture
    on at

    Hi Deya,

    We don't select specific PO number as subworkflow but we select PO Workflow ID and both are different things. There could be 100 Purchase Orders in the system but might be PO workflow will be same to approve these PO's unless and until if there is any exceptional case.

    From your business case i don't think you need subworkflow. As i suggested you in my last thread, if you want to automate PO creation process that will be triggered from Employee Loaned item screen based on item unavailability then you should go for Azure logic apps. Do you have a developer around you?

  • Deya Saleh Profile Picture
    on at

    you means only works with customization.

    I think I've got my answer

  • Suggested answer
    Adolfo Castillode la hoz Profile Picture
    25 on at
    Good evening, in the thread of this case something similar happens to me with the workflow of the purchase contract
    
    I have a main flow that, under some conditions, it calls sub-workflows.

    pastedimage1617662909573v1.png

    To call each subworkflow, I indicate the subworkflow and it forces me to enter the document key ParentPurchaseAgreementID_PSN


    pastedimage1617662943233v2.png

    The problem that this field is not reported and does not find the context.

    pastedimage1617663166809v4.png

    Stopped (error): X++ Exception: Failed to find subworkflow data
    at SysWorkflow-submitSubWorkflow
    SysWorkflow-submitSubWorkflows
    SysWorkflow-save
    SysWorkflowQueue-resume

    X++ Exception: The workflow system could not access the business document data. Report this issue to

    your system administrator.

     at SysWorkflowDocument-assertAsUser

    SysWorkflowDocument-assert

    SysWorkflowDocument-assertPermission

    SysWorkflowDocument-getDocument

    SysWorkflow-submitSubWorkflow

    SysWorkflow-submitSubWorkflows

    SysWorkflow-save

    SysWorkflowQueue-resume

     
    Anyone have any ideas?


    Regards,
    Adolfo

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

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 573

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 573

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 396 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans