getSyncLogCurrentPosition
Retrieve the current position of the data synchronization log.
Description
The system keeps a log of every change made to various objects (such as Product, Customers, etc). Each change is tagged with a sequential log position (starting at 1 and counting up). This method returns the last position in the log for the given ObjectName. This is useful if you have just retrieved all products from the server and are now ready to start doing incremental syncing. (See the getSyncLog method for more information on incremental syncing).
Leave ObjectName blank to retrieve the last position for all objects.
Syntax
integer getSyncLogCurrentPosition ( ueSecurityToken, ObjectName)
Arguments
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and retrieve the custom fields. |
string | ObjectName | Type of object: Product, Customer, etc. |
Return Value
Type | Description |
---|---|
integer | Returns the current sync position for ObjectName |
Exceptions
The following exceptions (errors) are applicable to this method.
Code | Message | Advice |
---|---|---|
41004 | Unknown object | The specified ObjectName was not recognized. ObjectName must either be left blank (for all objects) or must correspond to a valid object (ie Product, Customer, etc). |
Examples
VB
Dim ObjectName As String
ObjectName = "Product"
Dim log As String
log = client.getSyncLogCurrentPosition(token, ObjectName)
MsgBox(log)
.NET C
string ObjectName = "Product";
string response;
try
{
response = client.getSyncLogCurrentPosition(token, ObjectName);
MessageBox.Show(string.Concat(response));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}