IsUpdated Operation
Microsoft Dynamics Nav 2009
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.
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. } } } }
Community Additions
ADD
Show: