Consultor Eletrônico



Kbase P18784: Opening child nodes in TreeView results in not being able to reposition to add first level records
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/3/2005
Status: Unverified

FACT(s) (Environment):

Dynamics

SYMPTOM(s):

Opening child nodes in TreeView results in not being able to reposition to add first level records

Dynamics STRUCTURED Treeview Node does not set parent key from foreign field correctly.

The parent key value is not correctly set from the foreign field value

Can not reposition in tree view from child node

Using a structured node to add records

CAUSE:

The parent value is not automatically filled when adding a new child node for a parent. This is a known issue being investigated by Development.

FIX:

Set the parent field value manually by creating an addRecord override procedure in the viewers super procedure as follows:

PROCEDURE addRecord:

DEFINE VARIABLE hContainerSource AS HANDLE NO-UNDO.
DEFINE VARIABLE dParentObj AS DECIMAL NO-UNDO.

RUN SUPER.

/* This should return the handle of the Dynamic TreeView Container */
{get ContainerSource hContainerSource}.

dParentObj = DYNAMIC-FUNCTION("getUserProperty":U IN hContainerSource, "ParentKeyValue":U).

/* Use the value assigned to dParentObj and assigns your parent
field value to this value */
END PROCEDURE.