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, ...
Answered

Not allow submit to workflow based on a condition

(0) ShareShare
ReportReport
Posted on by 150

In trvexpenses form there is a standard workflow.

If the amount in the trvexptrans table is more than 1000( just an example) I don't want the the user to be able to submit the record to the workflow.

How do I do this?

Do I extend the workflow event handler? If so then how?

Thank you 

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at
    RE: Not allow submit to workflow based on a condition

    Hi Prachi,

    Please check the method TrvExpTable\canBeSubmitted. This method already contains logic validating if an expense report can be submitted. You can create a CoC for this method and add your validation logic here.                                                

  • Suggested answer
    Alfasith AX Profile Picture
    120 User Group Leader on at
    RE: Not allow submit to workflow based on a condition

    Hi Prachi,

    Why dont you try flow controls ->  conditional decision in respective workflow design, select the table, coloumn and amount with < XXX.

  • PrachiGupta97 Profile Picture
    150 on at
    RE: Not allow submit to workflow based on a condition

    How do I write a coc?

    I have not done one before..

    Also can I write it in the validatesubmit method of the table?

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at
    RE: Not allow submit to workflow based on a condition

    Hi Prachi,

    Please check this link on how you can create CoC for a table method. I think validateSubmit method will work as well. To be sure, you can debug and make sure this method is being called before submitting to workflow.

  • PrachiGupta97 Profile Picture
    150 on at
    RE: Not allow submit to workflow based on a condition

    Thank you so much this worked.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,047

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 592 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans