We use entering_scope throughout our application to reload a screen, it's easy.
example:
Code:
Procedure Entering_Scope Returns Integer
Integer iRet iAcNo iOldAcNo iAnswer iTab
Boolean bRefresh bViewChanged
Move Client.ACCOUNT_NO to iAcNo
Get Field_Current_Value of oClient_DD Field Client.ACCOUNT_NO to iOldAcNo
If (iAcno<>0) Begin
If (iOldAcNo<>0 and iOldAcNo<>iAcNo) Begin
Get Should_Save of oClient_DD to bViewChanged
If (bViewChanged) Begin
Get YesNo_Box "The Client that is currently active in the Client Master screen has changes.\nYou have been looking at a different Client elsewhere in the program.\nDo you wish to loose the changes and load the Client you have just been looking at?\n\nPress No to keep the Changes." "Changes Detected" MB_DEFBUTTON2 to iAnswer
If (iAnswer=MBR_YES) Move True to bRefresh
Else Move False to bRefresh
End
Else Move True to bRefresh
End
Else Move False to bRefresh
End
If (bRefresh) Begin
Send Clear of oClient_DD
Move iAcNo to Client.ACCOUNT_NO
Send Find of oClient_DD eq 2
End
Forward Get Msg_Entering_Scope to iRet
Procedure_Return iRet
End_Procedure
The way to get the correct record to load in the view is to load the record into the buffer i.e. before Send Activate_oview you find the record you want