I have registered a UDO with a SAP B1 form with both Closed and Cancel services.
I close one form and the "Status
" fields reads 'C' for that particular DocEntry.
When I open that form again, I am still able to edit it and even update the form.
I need the form un-editable after closed status so no one can change anything.
How do I achieve this?
I would handle this with the LoadAfter And DataLoadAfter events.
Check using either the Status ComboBox or the DataSource to find if the Document is closed,
If so then loop through all controls on the form and set them to editable = False or alternatively Set the form mode to View
foreach (Item item in oForm.Items)
{
item.editable = False;
}
// or
Me.UIAPIRawForm.Mode = SAPbouiCOM.BoFormMode.fm_VIEW_MODE