Skip to main content

Notifications

Announcements

No record found.

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 30

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

  • Suggested answer
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!
    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

  • Deya Saleh Profile Picture
    Deya Saleh 30 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    you means only works with customization.

    I think I've got my answer

  • Suggested answer
    Junaid Idrees Profile Picture
    Junaid Idrees 12,746 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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
    Deya Saleh 30 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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
    Junaid Idrees 12,746 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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
    Deya Saleh 30 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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
    Junaid Idrees 12,746 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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
    Deya Saleh 30 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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!!

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,391 Super User 2024 Season 2 on at
    RE: Sub-Workflow error Document key Field empty, need a Sub-Workflow example and what is there for !!

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans