Checks if an object has been updated since the key was obtained.
This operation returns true if the object has been updated
by any user; otherwise, false. Concurrency management will
prevent a record being changed if it has been subsequently updated.
This check will proactively prevent that failure.
Parameters
Parameter |
Description |
Key
|
Type: String
The bookmark of the record, including both primary key and
concurrency information.
|
Results
Result name |
Description |
IsUpdated_Result
|
Type: Boolean
Returns true if and only if another user has modified the
record.
|
Faults
SOAP fault message |
Description |
[record name] [field] [value]
does not exist.
|
Indicates that the record has been deleted by another user or
process after it has been retrieved for this operation.
|
Usage Example
C# |
Copy Code |
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication
{
// Import newly generated Web service proxy.
using WebService;
class Program
{
static void Main(string[] args)
{
// Create instance of service and set credentials.
Customer_Service service = new Customer_Service();
service.UseDefaultCredentials = true;
Customer cust = new Customer();
cust.Name = "Customer Name";
service.Create(ref cust);
cust = service.Read(cust.No);
if (!service.IsUpdated(cust.Key))
{
// Add code here to modify record.
}
}
}
}
|
See Also