Hi friends,
I have the below code that runs for my submit that is running off of a button. Does anyone know how to (what to) put to stop this from running and give an error message if the form is open as read only? I am getting row update errors if someone trys to submit it as read only, there ends up being a conflict.
function CTRL2114_7::OnClick(eventObj)
{ try
{ XDocument.QueryAdapter.Timeout=240;
XDocument.QueryAdapter.Submit();
XDocument.DataAdapters["MainConnection"]
XDocument.DataAdapters["Submit"] .Submit();
XDocument.UI.Alert("Document submitted successfully.");
eventObj.ReturnStatus = true;
XDocument.SetDirty(false);
XDocument.View.Window.Close(true); }
catch(ex)
{ XDocument.UI.Alert(ex.description);
eventObj.ReturnStatus = false; }
}