Cancel and Reason Code Issues

Hi Everyone. 

We have decided to setup Cancel and Reason Codes for all Sales orders and Quotes.

On Sales Order Options I have changed "Retain Deleted Orders/Quotes" to Prompt.

Now when I go to delete and Order/Quote I get a prompt asking do I want to save the Order in History and then after it asks me a for a reason code. 

For some reason I can just click "OK" on the reason code part and it just lets me skip it without putting in a reason. Any idea why this might be? Any way to make a reason always required?

Thanks Guys

Parents
  • You could customize that panel (library is SO_SalesOrder.M4L and panel is dCancel) and hide the Cancel button and the OK button, then create a custom button to place where the original OK button is and then use a script to check if the cancel reason is blank and display a message saying it is required, if not blank, then you would call oUIObj.BT_CancelOK.  This unfortunately won't stop them from being able to click the X button on the title bar.  You may not need to hide the Cancel button but as far as I can tell, clicking Cancel doesn't stop the deletion of the order, so not really sure what it is doing other then just not setting a cancel reason in history.

Reply
  • You could customize that panel (library is SO_SalesOrder.M4L and panel is dCancel) and hide the Cancel button and the OK button, then create a custom button to place where the original OK button is and then use a script to check if the cancel reason is blank and display a message saying it is required, if not blank, then you would call oUIObj.BT_CancelOK.  This unfortunately won't stop them from being able to click the X button on the title bar.  You may not need to hide the Cancel button but as far as I can tell, clicking Cancel doesn't stop the deletion of the order, so not really sure what it is doing other then just not setting a cancel reason in history.

Children
  • in reply to David Speck

    This is what I remember, but I am not sure if this was the final solution.  UDF with scripted validation to the reason code list (or UDT validation for mirror values). Then Pre-Delete script to ensure the UDF is not blank, then write the value to the reason code field during the deletion.  If UDF is blank, SetError.

    I think I had to disable the prompt for this to work... IIRC the Sage UI programming for setting reason code wouldn't work with the Pre-Delete script.