Sture
26-Nov-2015, 02:49 PM
Hi there,
Consider the Order.wo of the weborder sample. It displays an order and all the lines of that order.
If you want to bring up the view with a particular order active you can add this procedure to the object
Set pbServerOnShow to True
Procedure OnShow
Send FindByRowId of oOrderHea_DD OrderHea.file_number riSomeRowID
End_Procedure
This works nicely.
If I want to bring up the view with a particular orderline and its adjacent orderheader I add
Set pbServerOnShow to True
Procedure OnShow
Send FindByRowId of oOrderDtl_DD OrderDtl.file_number riSomeRowID
End_Procedure
This also works nicely EXCEPT if the order-view is not already loaded. When this is the case the correct order is found but the intended detail record is not made active.
I have a attached a modified Order.wo and a new view SeedTestView.wo to demonstrate this. If these are copied to WebOrder\AppSrc and oSeedTestView is added to the project the problem can be seen in action. By doing so the test-view will be the defaultly loaded view. Note that the second button only functions when the oOrder view has been activated at least once.
-Sture
Consider the Order.wo of the weborder sample. It displays an order and all the lines of that order.
If you want to bring up the view with a particular order active you can add this procedure to the object
Set pbServerOnShow to True
Procedure OnShow
Send FindByRowId of oOrderHea_DD OrderHea.file_number riSomeRowID
End_Procedure
This works nicely.
If I want to bring up the view with a particular orderline and its adjacent orderheader I add
Set pbServerOnShow to True
Procedure OnShow
Send FindByRowId of oOrderDtl_DD OrderDtl.file_number riSomeRowID
End_Procedure
This also works nicely EXCEPT if the order-view is not already loaded. When this is the case the correct order is found but the intended detail record is not made active.
I have a attached a modified Order.wo and a new view SeedTestView.wo to demonstrate this. If these are copied to WebOrder\AppSrc and oSeedTestView is added to the project the problem can be seen in action. By doing so the test-view will be the defaultly loaded view. Note that the second button only functions when the oOrder view has been activated at least once.
-Sture