Consultor Eletrônico



Kbase P62106: Dyn: For an SDO, asDivision is ? before SUPER in initializeO
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/2/2004
Status: Unverified

FACT(s) (Environment):

Dynamics 2.1A

SYMPTOM(s):

For an SDO, asDivision is unknown before SUPER in initializeObject

Dynamics 2.1A01

CAUSE:

Known issue Development aware.
Indeed, the Asdivision property behaves like this in a SDO initializeObject:
On  server side it is 'server', before and after super
In a thin Client session, it is '?' before super then 'Client' after
In a fat Client session, it is '?' before super then blank after

So the problem is to determine if you are in a fat or in a thin client session before SUPER in a SDO initializeObject.

FIX:

Having read the comment in getAsDivision of src\adm2\appserver.p, there is no easy way to fix this problem, especially when we want to be able to handle multiple partitions depending on the concerned SDO, and if we want to let the ability to have a semi thin client or not (thin for some SDO, fat for some others) as the framework somehow permits for now.

That being said, if your case is simple as having:
1) Either fat, of thin or server session, but no mix
2) Only connection to AppDatabase+ICFDB for fat client or not connection at all for thin client (such as with WebClient)

Then the temporary solution could be to override getAsDivision of src\adm2\appserver.p to modify the following:

IF cDivision = ? THEN
DO:
/* return ? if not initialized */
{get ObjectInitialized lInitialized}.
IF NOT lInitialized THEN
RETURN cDivision.

By
IF cDivision = ? THEN
DO:
/* return ? if not initialized */
{get ObjectInitialized lInitialized}.
IF NOT lInitialized THEN DO:
IF NUM-DBS = 0 THEN RETURN 'Client'.
RETURN cDivision.

This could well be done in a strong override (in adm2/appserver.p itself) or in a datacustom.p, or in your SDO subclass.