Passing Parameters from client to server when deleting record

Natalie Barlow

New Member
Hi,
I am using Progress 10.2A, but am using the basic ADM2 objects, ie: smartdataobjects, smartviewers etc. I am using a state-less appserver. My problem is I want to pass the user id from the client side to the server side when I delete a record. I cant use calculated fields as they are not refreshed on the server side when a record is deleted.

Does anyone have any ideas?

Thanks, Natalie.
 

RealHeavyDude

Well-Known Member
Unfortunately the ADM2 only has a very basic context management built into it. Something like managing the identity of the user is not in scope of the ADM2.

There are several possible ways in passing additional information to the server in the context of a transaction. You might extend the context (see setContextAndInitialize and obtainContextForServer) both of which you will find in data.p.

BUT:

Since you have the identity of the user on the client side, I assume that the user has logged into the application at some point and the login credentials were verified in the server-side business logic.
If that's the case you might use a combination of the AppServer procedures (event procedures) for login an activate and the SERVER-CONNECTION-CONTEXT and SERVER-CONNECTION-ID attributes on the SESSION system handle. In the login event procedure you can verify the login credentials and store them somewhere together with the SERVER-CONNECTION-ID - maybe on the SERVER-CONNECTION-CONTEXT attribute. In the activate procedure you could retrieve these settings with the SERVER-CONNECTION-ID and probably do a SETUSERID in the AppServer session ...

HTH, RealHeavyDude.
 
Top