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

Community site session details

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

Workflow is not triggering in D365 f&o.

(6) ShareShare
ReportReport
Posted on by 202
Hi, 
I've set up a custom workflow for my custom form, which includes a status field. In the table's CanSubmitToWorkflow method, I've added a condition to trigger the workflow when the status is 'Draft'. Despite activating the workflow in the environment and creating a new record with the status set to 'Draft', the workflow still isn't triggering. Am I overlooking something
Categories:
I have the same question (0)
  • RSX Profile Picture
    202 on at
    Workflow is not triggering in D365 f&o.
    Hi 
    Yes, It is the same
  • Suggested answer
    Waed Ayyad Profile Picture
    8,823 Super User 2025 Season 2 on at
    Workflow is not triggering in D365 f&o.
    Hi,
     
    Did you check the Query that used on the workflow? Does it contain the same table on the form?
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

  • RSX Profile Picture
    202 on at
    Workflow is not triggering in D365 f&o.
    Hi,

    Yes, I've checked the details and when a new record is created the first enum value is Draft.
  • Suggested answer
    Waed Ayyad Profile Picture
    8,823 Super User 2025 Season 2 on at
    Workflow is not triggering in D365 f&o.
    Hi @RSX,
     
    Did you check my last comment?
     
    Is the draft the first value of your Enum?  Are you sure when you create new line, the status is draft? Maybe you have other default value for your Enum like None, check the data from SQL or table browser.
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

  • Suggested answer
    Waed Ayyad Profile Picture
    8,823 Super User 2025 Season 2 on at
    Workflow is not triggering in D365 f&o.
    Hi,
     
    Is the draft the first value of your Enum?  Are you sure when you create new line, the status is draft? Maybe you have other default value for your Enum like None, check the data from SQL or table browser.
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

     
     
     
  • RSX Profile Picture
    202 on at
    Workflow is not triggering in D365 f&o.
    Hi 
    Yes, I did build and sync my model after removing the default parameter.
    Also activated the new workflow set up, still the workflow was not activated on the draft status. 
  • Suggested answer
    Waed Ayyad Profile Picture
    8,823 Super User 2025 Season 2 on at
    Workflow is not triggering in D365 f&o.
    Hi @RSX,
     
    Did you build and sync your model after removing the default parameter?
    Did you try to activate new workflow (configure new workflow) setup?

     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

     
     
  • RSX Profile Picture
    202 on at
    Workflow is not triggering in D365 f&o.
    Hi,

    I removed the default value of workflow parameter, it didnt work. 
    Tried debugging again, the debugger is not getting hit.
  • Suggested answer
    Waed Ayyad Profile Picture
    8,823 Super User 2025 Season 2 on at
    Workflow is not triggering in D365 f&o.
    Hi,
     
    Try to remove default value of workflowtype parameter:
     public boolean canSubmitToWorkflow(str _workflowType)
        {
    
            boolean ret;
            ret = super(_workflowType);
            if(this.status == statusEnum::Draft)
            {
                ret = true;
            }
            else
            {
                ret = false;
            }
            return ret;
        }

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

  • RSX Profile Picture
    202 on at
    Workflow is not triggering in D365 f&o.
    Hi, yes I tried debugging after full build with synch, but the debugger was not getting hit 
     public boolean canSubmitToWorkflow(str _workflowType = '')
        {
    
            boolean ret;
            ret = super(_workflowType);
            if(this.status == statusEnum::Draft)
            {
                ret = true;
            }
            else
            {
                ret = false;
            }
            return ret;
        }
     

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

Responsible AI policies

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

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans