Skip to main content

Notifications

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 

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

    Thank you so much this worked.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 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
    PrachiGupta97 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
    Alfasith AX Profile Picture
    Alfasith AX 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.

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 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.                                                

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans