im trying to create a button that deletes a record...
# suitescript
l
im trying to create a button that deletes a record how can i do that?
n
Why? The delete button is already there.
l
because i want to delete item fulfillments only when status is picked
n
You probably don't need a button for that but a validation check.
z
A custom workflow action script that just does record.delete would do it. You could have it trigger based on a button and run as admin. Then you could make the native delete be not needed.
l
@Zack thats exactly what i did but im getting an error. Can you help me out. Here is the error: Cannot read property "type" from undefined
nevermind, i figured it - Thank you for your suggestions guys
👍 1
n
You could have hidden the delete button unless the criteria was met, might have been simpler to do in a UE script.
1