HowTo: Using Save Method from Actions for Smart Devices

Official Content
This documentation is valid for:

Many times after saving a register of a Transaction you need to do something else. Call another transaction, call an entry panel, a Procedure object, return to the List node, etc. So using the save action allows you to add more behaviour to your application.

In this article we will do one example of the previously mentioned.

We want to call a procedure after inserting a register into our application.

We are going to use the following transaction:

SDSaveTRN

As seen on the SmartDevicesApi folder the Save method doesn’t expect any parameter:

SDSaveMethodSDactions

The behaviour we want this example to have is to Save a new register and after that invoke a Procedure which is going to change some part of the register.

In order to do this let´s do the following procedure:

Procedure source:

ForEach
      CustomerMsg = "THE NEW MESSAGE"
EndFor

Procedure rules:

Parm(CustomerId);

Now we have all the elements needed to do our example.

We will start doing a new Action called "SaveWithProc".

SDSaveAction

By double-clicking over the new Action it will take us to the event associated.

As we want to Save and call a procedure we have to do a composite action:

Event 'SaveWithProc'
    Composite
	Actions.Save()
	Proc.Call(CustomerId)
    EndComposite
EndEvent

Add the new save action to the Application Bar on the Edit mode in Section General.

SDSaveActionBar

Examples

Android

SDSaveAndroid1

BlackBerry

SDSaveBB3