https://netsuiteprofessionals.com logo
#suiteflow
Title
# suiteflow
d

Deepthi

04/16/2022, 10:16 AM
I have created a workflow for vendor bills to be sent for approval regardless of dollar amount, and once the bill is approved and if someone edits the amount on the bill the bill needs to go to pending approval again. How do I achieve this? Workflow is checked for create, view and update as well
a

AI1

04/16/2022, 2:18 PM
In your Approved state make a transition back to Pending Approval using the After record submit trigger. Then anytime the Bill is in the Approved state and someone does an edit/Save it will transition back to pending approval
d

Deepthi

04/16/2022, 2:26 PM
i tried that, and now my bill does not go to approved status upon clicking approve.
a

AI1

04/16/2022, 2:27 PM
If you look at the workflow history does it go to the Approved state then immediately back to Pending approval?
If so try adding a custom checkbox to your bill record called “Edited” Add an action to the approved state that checks that box (before user edit or before record submit) Then add a condition to you Transition of Edited checkbox = T Also remember to uncheck the edited checkbox upon entry of Pending Approval state
So checkbox = F in Pending Approval State Checkbox = F when first entering Approved state Checkbox changes to T when edited in Approved state (triggers transition) Checkbox = F when it moves back to pending approval (Loop continues)
d

Deepthi

04/16/2022, 2:31 PM
yes it geoes to approved state and then back to pending approval
ok
let me try and thank you for the in inputs
How do i trigger this "Checkbox changes to T when edited in Approved state (triggers transition)"
a

AI1

04/16/2022, 11:18 PM
Add an action to the approved state Action type = set field value Trigger type = before user edit Parameter field = custom edited field
Value = checked
d

Deepthi

04/17/2022, 3:20 PM
If the approved state is not set at do not exit workflow. my wf is just stuck at loop and wont approve, got sometime to check this out?
a

AI1

04/17/2022, 3:35 PM
Hmmm. In the approved state is the set field value action triggering on before user edit?
d

Deepthi

04/18/2022, 9:10 AM
it was on entry, i have updated to before user edit now, and its still same
j

Josh Godfrey

04/19/2022, 3:00 PM
You'll need to add criteria to the transition (after record submit) back to the pending approval state. You do not want the approved state to be
do not exit
1. Add a workflow field that stores the amount after you leave the pending approval state 2. In the approved state, add a transition (after record submit) back to pending approval state if the
AMOUNT
!==
Workflow Amount Field Amount
3. Once back in the pending approval state, you reset the Workflow Field Amount after it transitions into the second state of the workflow
I think you might be able to just add criteria to check the old record value, and compare the old record amount to the current amount set. But I find it easier to capture data in workflow fields, then I can query on them if I'm looking into of debugging WF Logs.
a

AI1

04/19/2022, 3:04 PM
@Josh Godfrey Won't that just require re-approval if the amount changes. I thought he was requesting ANY change to the Bill requires re-approval, that's why I was going with the custom checkbox that would be checked anytime someone clicks the edit button.
@Josh Godfrey oh whoops...my fault, reread his request it is on amount🤦‍♂️ I made this overcomplicated sorry
netsuite 1
j

Josh Godfrey

04/19/2022, 3:05 PM
I skimmed through the conversation but saw this on the original comment
"bill is approved and if someone edits the amount on the bill the bill needs to go to pending approval again."
a

AI1

04/19/2022, 3:06 PM
@Deepthi sorry yes Josh's way is a good way to do it. I missed that you were only looking for amount changes. I steered you wrong for a few days there.
d

Deepthi

04/20/2022, 1:01 PM
hey you'all this worked! thank you 🙂
netsuite halo 1
j

Josh Godfrey

04/20/2022, 1:01 PM
Out of curiosity, did you check the old record value, or did you store the value in a WF Field?
d

Deepthi

04/20/2022, 1:02 PM
checked old record value
j

Josh Godfrey

04/20/2022, 1:02 PM
Nice! Happy it worked for you.
d

Deepthi

04/20/2022, 1:02 PM
thank you again. also the approve bills page doesnt it show bills for 2 level role based approval wf or does it need soemthing to be enabled?
j

Josh Godfrey

04/20/2022, 1:05 PM
How are you determining who needs to approve? Just the user role?
d

Deepthi

04/20/2022, 1:05 PM
yes just user role
j

Josh Godfrey

04/20/2022, 1:08 PM
You might need two pending approval levels Pending approval state 1 === UserRole1 Clicks Approve (transition to pending approval state 2 where UserRole2 needs to approve) OR Pending approval state 1 === UserRole 2 Clicks Approve (transition to approved) Pending approval state 2 === UserRole 2 Clicks Approve (transition to approved)
Something like this, but we require employee and supervisor approval. You would do the same thing but if the second level user approves in state two, you could skip the second approval state.
d

Deepthi

04/20/2022, 1:27 PM
yes these are setup correctly, great thank you
in this page once the first approver is approving from here, it gets approved and doesnt go to second approver
but if i view bill and approve it, it goes for 2nd approver, doesnt approve bill page trigger to second approver
3 Views