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

  • FormerMember
    FormerMember

    How are you dealing with reasons not offered? Skip the field?

  • Choosing a Reason for Cancel/Delete is not required. I'm not sure how you can make this a required choice.  Here is what the options do.  

    Retain Deleted Orders/Quotes

    Select an option to define how deleted order/quote information is handled.

    • Select Yes to retain deleted order/quote information in sales history.

    • Select Prompt to be prompted to enter cancellation codes when an order/quote is deleted.

    • Select No if you do not want to retain deleted order/quote information in sales history.

    This field is available only if you selected the Retain Sales Order/Quote History check box.

  • in reply to FormerMember

    When they get to the screen that asks them for a reason for removal of sales order they are able to just click cancel and not put it in a reason. We would like to make a reason required.

  • in reply to Gcjamie

    I don't believe there is a way to make it a mandatory prompt. 

    (I've scripted something before for this, but I don't remember the details, but I'm sure it was not modifying the prompt... perhaps UDF and button script...).

  • 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.

  • 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.