I am creating a reject button on sales order when ...
# suitescript
t
I am creating a reject button on sales order when the order is in pending approval... and then and on the reject button click user is entring the rejection reason that i am storing in custom field and setting the approvalstatus field to rejected but the status is still pending approval
m
yes add the rejection status in the rejection state
when you enter the rejection state - on entry, swap status
t
Actually I am doing this with script
b
How do you reject a sales order normally
I dont recognize the approvalstatus field
t
then whats should I do to reject it from script when Reject button is clicked(reject button is custom button i created on before load and and click I am calling a suitelet to capture rejection reason)
b
depends on what you normally do to reject sales orders
if you dont care, then the answer is close the sales order by setting the
isclosed
checkbox on every line
t
Normally I dont think we are rejecting... This is what I need to build for rejection