Siebel Mobile Connector Guide > Working with the Siebel Mobile Connector > Getting Updates >

GetSMCUpdate


The method GetSMCUpdate is invoked to retrieve the changes in data from a specified time to the current time. The changes that are noted are at the record level versus for a specific field. Even if you apply a style sheet which parses the particular field that changes, the record will show as having changed. If your application requires notification about changes to specific fields, then you can use the Alert Business Service for this purpose. This is an important point for understanding this method.

The GetSMCUpdate method cannot be subscribed to at the Form Applet or Entry Applet level, only at the List Applet level. Also, if a field that has changed is present in both the List Applet and the Form Applet, then the GetSMCUpdate method will pick up the changes at the record level in the Form Applet.

When using the GetSMCUpdate method to retrieve updates for child applets, the method only returns the records for the child applet associated with a particular parent record.

NOTE:  For a client application to receive updates, it is also necessary that the parameter VoiceApplication be set to TRUE. For more information, see Configuring a User Agent for the Siebel Mobile Connector Applications.

Send a command to SWE with the following parameters to get an update:

Parameters
Required or Optional
Description

SWECmd=InvokeMethod

Required

Sets the name of the SWE command to InvokeMethod.

SWEMethod=GetSMCUpdate

Required

Sets the name of the SWE method to GetSMCUpdate. This is a new SWE method available with the Siebel Mobile Connector.

SWEView=<view_name>

 

Required

Specifies the name of the view you want to receive an update for.

SWEApplet=<applet_name>

Required

Specifies the name of the applet you want to receive an update for.

You must subscribe to the GetSMCUpdate at the List Applet level, not the Form Applet or Entry Applet level.

SWESetMarkup=XML

Required

Specifies the XML markup mode.

LastUpdate=<date>

Optional

Specifies the last update date or date/time. For example, 07/30/2002 or 07/30/2002 12:00:00. The time is denoted in 24 hour format (military time). The update is the delta between the current time and the time specified. If no value is specified, all requested data will be returned.

SWEXslStyleSheet=<name_of_style_sheet>

Optional

Specifies an XSL style sheet to be applied to the output results.

SWESetRowCnt=<#_of_rows>

Optional

Specifies the number of rows to be applied. If no value is given, the number of rows returned matches the default value for NumberOfListRows specified in the smc.cfg file.

To get an update

  1. Log in to SWE and navigate to the screen, view and applet to which you want to go.

    For more information, see Logging In, Navigating to a Screen and Navigating Within a Screen.

    NOTE:  It is not necessary to navigate to a specific view or applet if you want to get an update for the screen's default view.

  2. Invoke the GetSMCUpdate method.

    In the following example, you want to get an update for records that have changed from 07/01/2002 to the present:

    http://localhost/sales/start.swe? SWECmd=InvokeMethod&SWEMethod=GetSMCUpdate&SWEView=SMC+Account+View&SWEApplet=SMC+Account+ListApplet&LastUpdate=07/01/2002&SWESetRowCnt=100&SWESetMarkup=XML

    NOTE:  If you pass an invalid date for the LastUpdate parameter, you may receive an error message Unable to load message 0xffff. This message indicates that the date given is not a valid parameter for the GetSMCUpdate method.

Additional Examples

This section lists several additional example requests to SWE using the GetSMCUpdate method.

  • The following request passes a date as the value of the LastUpdate parameter. It retrieves all records that have changed since 07/30/2002 or later.

    http://localhost/smc_enu/start.swe?SWECmd=InvokeMethod&SWEMethod=GetSMCUpdate&SWEView=SMC+Account+View&SWEApplet=SMC+Account+List+Applet&SWESetMarkup=XML&LastUpdate=07/30/2002

  • The following request passes a date and time as the value of the LastUpdate parameter. It retrieves all records that have changed since 07/30/2002 at noon or later.

    http://localhost/smc_enu/start.swe?SWECmd=InvokeMethod&SWEMethod=GetSMCUpdate&SWEView=SMC+Account+View&SWEApplet=SMC+Account+List+Applet&SWESetMarkup=XML&LastUpdate=07/30/2002 12:00:00

  • The following request passes a date as the value of the LastUpdate parameter and uses a style sheet to filter data.

    It retrieves only the data specified in CompanyName_SiebelMobileConnector_SMCAccountView_GM.xsl for records that have changed since 07/30/2002 or later.

    http://localhost/smc_enu/start.swe?SWECmd=InvokeMethod&SWEMethod=GetSMCUpdate&SWEView=SMC+Account+View&SWEApplet=SMC+Account+List+Applet&SWESetMarkup=XML&LastUpdate=07/30/2002 12:00:00&SWEXslStyleSheet=CompanyName_SiebelMobileConnector_SMCAccountView_GM.xsl

    NOTE:  Remember that the GetSMCUpdate method retrieves changes at the record level and not for specific fields. If you apply a style sheet to limit data to a specific field, this will not make a difference. When your application must retrieve updates at the field level not the record level, then use the Alert Business Service.

  • The following request passes a date as the value of the LastUpdate parameter. It retrieves all records that have changed since 07/30/2002 or later, up to a maximum number of 50 records.

    http://localhost/smc_enu/start.swe?SWECmd=InvokeMethod&SWEMethod=GetSMCUpdate&SWEView=SMC+Account+View&SWEApplet=SMC+Account+List+Applet&SWESetMarkup=XML&LastUpdate=07/30/2002&SWESetRowCnt=50

  • The following request passes a date as the value of the LastUpdate parameter. It retrieves all records that have changed since 07/30/2002 or later (assuming that there are less than 500 records).

    http://localhost/smc_enu/start.swe?SWECmd=InvokeMethod&SWEMethod=GetSMCUpdate&SWEView=SMC+Account+View&SWEApplet=SMC+Account+List+Applet&SWESetMarkup=XML&SWESetRowCnt=500

Siebel Mobile Connector Guide Copyright © 2006, Oracle. All rights reserved.