In a certiain sale type, the users are not allowed to set the sale to Sold.
EventData ed = getEventData();
String SaleType = ed.getInputValue("SaleEntity.SaleType.Id");
String Status = ed.getInputValue("SaleStatus");
if(SaleType == "2" && Status == "2")
ed.setValidationMessage("Please change the Sale Type before setting the sale to Sold");
The script prevents it, but when changing to another STAGE, the stage field becomes blank on save.
This occours both in 8.5 as well as latest online
I will report this as a bugg, but, do anyone have any workaround how to solved the issue?