Skip to Content

Approval start before stored procedure

Mar 01 at 11:13 AM


avatar image

Hi experts,

I have a problem that the approval procedure execute before the stored procedure.


I have a stored pro + formatted search with an UDF to make sure user save PO as a draft first. then if they make any changes that change the document total (unit price / quantity), user must save PO Draft as a draft again.

my stored pro:

my formatted search:

As you can see if the total amount is changed, user cannot add it to PO(because the query change the U_PODraft to 0) , they have to save as draft again (Stored pro will change the U_PODraft to 1) . This works perfect fine.

The problem:

there are some approval procedure for some cost center

(@Depart is just a udf for cost center)

the problem is that for these cost center, approval is trigger before the stored procedure.

meaning that even if my U_PODraft is 0, i can still add the draft.

How can i fix this problem?

Many thanks,


001.png (101.1 kB)
002.png (38.2 kB)
003.png (65.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

J C Mar 05 at 03:25 AM

Any help would be very grateful

10 |10000 characters needed characters left characters exceeded