Hi, I have a requirement to show/capture a reason ...
# suiteflow
n
Hi, I have a requirement to show/capture a reason when a user tries to close a PO. A user needs to enter a reason before closing a PO using a standard “Close” button. Please let me know if this is possible via workflow? Or Please share if you have any alternate ideas to achieve it.
a
Yes this is possible. (Kind of) First add a custom field to the PO called Close reason Then use the Remove button action to remove the native close button Then use the Add Button action to add a custom button called Close PO or whatever you want. But add a condition that the button will only show if the close reason field is not empty Then when they click the custom close po button transition to a new state where you check the closed box on all lines
n
Thank you so much for your quick response. Let me try this now.
One more thought. Can we make the custom field mandatory (reason field) upon clicking the standard Close button via a workflow?
a
I guess you could. Transition to a new state in the WF when they click the button Then in the new state put a go to record action (open in edit mode). And go to the current record Then set the field mandatory in that state Then add a transition in that state to the close state
n
How do I set up “Transition to a new state in the WF when they click the button” in the workflow? Can I point my state/transition to a standard close button?
a
No you want to remove the standard close button and create your own
LIke this
message has been deleted
Also you need to create a workflow field to store the Current Record
So create a WF field, Type List/Record, Record = Transaction
Then in your first state set the value of you WF field to the current record.
message has been deleted
Then transition to your next state - execute on ubtton
message has been deleted
In your next state use the Go To Record Action to go to the current record (using your WF field)
message has been deleted
Also use the Set field mandatory
Then add a transition to the next state when the PO Rejection Reason is NOT EMPTY
message has been deleted
Now in your last state add a Sublist action group to Set Field Value Closed = T for all lines
message has been deleted
now the standard close button is gone, but your custom close button is there
message has been deleted
And it only goes to closed when someone enters the reason..otherwise it will stay un-closed
message has been deleted
(might need to add a scheduled transition from the Enter Close Reason state BACK to the start state, so they don't get stranded there, but overall it works well
n
Can you please check if this is correct one?
message has been deleted
I am not able to map go to record parameter correctly as you shown in your screenshot.
message has been deleted
message has been deleted
a
Did you create the workflow field?
n
Yes, I did. Could you please check all my other screenshots as well? Thanks
a
So you need to make 2 fields
The first is a transaction body field
message has been deleted
The second is within the workflow
Make it a list/record field
Is your workflow:po reason field a list/record field?
Like my current record field?
n
yes, it is a workflow field only. The PO Closure Reason field is transaction body field.
Yes, I created the PO Reason field exactly like your current record field.
I double checked everything with your screenshots. It is exactly matching, but when I test it, it shows an unexpected error and also doesn’t show the custom close PO button upon clicking the back button.
a
It looks like you are setting the PO reason field to be itself The po reason should = current record
n
I changed it to po reason should = current record, but when I test it on an existing PO it doesn’t show the custom close button. Can you please let me know how it works? I want to see this custom close po button on an existing PO and when I click on that, it should pop up a custom field to capture the reason. Once it is entered by a user, then workflow should close the po.
a
Here is a video of how the finished product will look
There is no way to add a "pop up" box through workflow that NetSuite has
so this is the best alternative
n
Awesome. Thank you very much 🙏. I will share my workflow. Please take a look at it and let me know what is missing.
a
Ok will do. Let me know when you can share. Or if you want to try and have a zoom call I can help walk you through it
m
Hi @NS User we developed a solution for this exact challenge. You can add a pop up window that will collect a rejection reason and then store the reason on the current record. Also many other actions to help enhance your workflows.