r
j
You could change it from buttons to a dropdown that allows you to choose reject or approve, and then use a set field mandatory action before setting a trigger to next state.
r
Do you know of a way that I could do this in 'view' context. From what I understand, the drop down would need to be accessed in 'edit' only. The goal is to allow the user to reject from view context and redirect them to edit contexts on the same record
j
You cannot with a dropdown, because it would be a before record submit action. What you are looking for is tough without scripting. I don't know if this would work, but here is an idea. You could create custom record type that acts as a "rejection notes" record. You could trigger the creation of this document, essentially popping up when hitting reject. Use sourcing to connect the expense report it should be linked to, and vice versa on the expense report. However you would need another workflow or script to update the field on the expense report, I am not sure if it would auto populate without editing.
👍 1
r
I like that idea, what I'm trying to do right now is just get a client script to trigger when it custom check box is toggled that will redirect the user to edit context, then use the workflow to make the rejection notes field mandatory
But having a hard time getting pageInit to trigger at the right time
t
organic thc huh.
r
@Tim Chapman glaucoma
m
You can use a WF to do this. Here’s an article we wrote recently on how to build this with the go to record action https://www.mgbcpro.com/blogs/post/go-to-record-action
r
Thanks @MGBC! That's good to know. After checking some Reddit threads for a while, I did find another solution that isn't as good as this one. I tricked the workflow by temporarily changing the type of field to a list record for list/record transaction, instead of integer to hold the ID. Then after saving that action in the workflow I changed it back and it ended up working