Official Content

Deprecated: Since GeneXus 15. Replaced by Return command.

The most common use of the return method is to associate it as a composite action:  To go back to the previous screen after doing some action.

ssreturn

In the following example we have an action on the View mode of the Section(General) of a WWSD. This action calls a proc and we want after the proc finishes executing to take the user to the previous screen.

Note: To understand the concepts of composite action please follow the link Composite examples.

For this example we will have the following TRN:

SSTRNUSERS

And an action that invokes a procedure that changes some attributes and commits the changes.

For example:

For Each
    Where UsersId = &UsersId
	UsersName = "Jhon"
	UserLastName = "Doe"
EndFor

ssProcProperties

To Add the return action:

First the action will execute the Procedure and afterwards the SDAction.Return. 

Event 'ProcCall'
    Composite
	ProcChangeValues.Call(UserId)
	SDActions.Return()
    EndComposite
EndEvent

Done!  After executing the procedure the application will return to the previous screen.



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant