Tracy -
I believe the problem is caused by the order in which dw_1 & dw_2 are created in the w_test_link window. Because the Linkage service configuration is being performed in each DW's Constructor event, the proper setup is not executing in the order it should.
In the example window, the "parent" DW (dw_cust) gets created first, then the "child" DW (dw_sales). In your window, the order is reversed (dw_2, the "child" DW first, then dw_1 second). Look at the order in which controls are created in the exported source of both windows.
This is why I prefer to place all of the Linkage configuration in the window's pfc_PostOpen event, and this is what i suggest you do, also. Here is how I recommend you try changing the code in w_test_link:
//-------------------------------
// dw_1 Constructor event script:
//-------------------------------
this.of_SetUpdateable( FALSE )
//-------------------------------
// dw_2 Constructor event script:
//-------------------------------
this.of_SetUpdateable(false)
//-------------------------------
// w_link_test pfc_PostOpen event script:
//-------------------------------
dw_1.of_SetLinkage(True)
dw_2.of_SetLinkage(True)
// Link this detail datawindow to it's master.
dw_2.inv_linkage.of_SetMaster(dw_1)
// Specify the columns that link the two DataWindows.
// The values in these columns will be used as retrieval arguments.
dw_2.inv_linkage.of_Register("type_id", "price_type_id")
// Specify how column links will be used...
// in the case, as retrieval arguments
dw_2.inv_linkage.of_SetStyle(dw_2.inv_linkage.RETRIEVE)
dw_1.inv_linkage.of_SetStyle(dw_1.inv_linkage.RETRIEVE)
See if this corrects the issue for you. I hope it helps.
Hugs and Kisses!
~~~Tracy
That's terrific news, Tracy!
My approach has always been two-fold:
1. If a service/feature affects only a single DW (or another visual control), then the control's Constructor event is where the service should be enabled and configured.
2. If multiple controls are affected (such as this Linkage example or the Resize service). then somewhere in the window open event sequence (pfc_PreOpen or a custom, dedicated invoked from the pfc_PreOpen event for Resize service configuration, for example) or pfc_PostOpen.