Hi, I've SDO with this code in the Procedure PretansactionValidate: IF VALID-HANDLE(i-puntero) THEN i-puntero:SCREEN-VALUE = "Checking " + _file._file-label. i-puntero -> Is a handle of a FORM thats contains this SDO. The problem is in the FORM don't view this Message ( "Checking " + _file._file-label), when in the 9.1E04 It's work perfectly!!!
I've SDO with this code in the Procedure PretansactionValidate:
IF VALID-HANDLE(i-puntero) THEN i-puntero:SCREEN-VALUE = "Checking " + _file._file-label.
i-puntero -> Is a handle of a FORM thats contains this SDO. The problem is in the FORM don't view this Message ( "Checking " + _file._file-label), when in the 9.1E04 It's work perfectly!!!
The sdo should have no reference to screen-value and this code should be in a viewer or a browser etc that deals with the user interface. In addition the sdo handles both client and server-side validation and data processing. If you run a fat client then the server code will also be run on the client, but if you use an appserver then the server code is executed on the server and it has no knowledge of the user interface and screen-value. PreTransactionValidate is a server procedure and should have no user interface.
While you code may have worked in an earlier version and I don't know why it doesn't now (unless you are running differently now - such as using an appserver), I suggest that you move that code to a user-interface procedure such as a viewer.
But I do not understand because in the previous version worked!
The problem is is that the code should be in the SDO and I can not put either in a viewer or a browser
I don't know why it worked in the earlier version either and you can raise with Tech Support, but I would suspect that they will also say that there should be no UI in an SDO. Why can't the code be placed in updateRecord on the viewer or browser?
Because this code will have to run every time you delete a record, and all our programs are handling code database on the SDO by AppServer issues. You would have to change very many of our ERP software to function in 10.2b01 version.
I do not see a change in version is not compatible with the previous version
So the sdo code can be called from more than on viewer and the screen object is on all of those viewers? If there is only 1 viewer then you alter 1 viewer and 1 sdo. preTransactionValidate is server-side code as seen in the snip of code below.
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE preTransactionValidate dTables _DB-REQUIRED
You can't address screen-value or any UI on a server. I'm not sure how you would get the handle of an object in a viewer and pass it to the server and then have the server address that memory space. Maybe if the appserver is on the same machine, it might work although I doubt it. If your running fat client without an appserver then again you may be able to get it to work. But the principle is wrong as there should be no UI in an SDO, particularly in the server side of the SDO.