« Back to Product

Documentation

IPS_FindObjectID

 int IPS_FindObjectID (int $RemoteID, int $ServerID) 

Parameters

RemoteID

ID of the object on the remote system

ServerID

ID of the Sync Remote instance

Returns

Local ID of the mirrored object. If no mapping exists, 1 is returned.

Description

Warning

This function is intended for internal use only and may change or be removed at any time without notice.

The function reads the mapping of object IDs between the local system and remote systems which are mirrored by Sync Remote instances (see Sync Remote). ServerID is the ID of the local Sync Remote instance.

The function returns the local ID of the object which mirrors the object RemoteID of the remote system of the Sync Remote instance ServerID. The root object of the remote system has the RemoteID 0. If no mapping exists, e.g. because the object has not been synchronized yet, the function returns 1.

The reverse direction is returned by IPS_GetRemoteObject.

Example

$serverID = 54321; // ID of the Sync Remote instance
$objectID = IPS_FindObjectID(23456, $serverID);
if ($objectID == 1) {
    echo "The object is not mirrored";
} else {
    echo "Local ID: " . $objectID;
}

/* e.g. returns:
Local ID: 12345
*/
Any questions?