Partajați prin


Update Operation

Updates a single record. The updated record is passed as a reference and is updated with the latest version.

Method Signature

void Update(ref Entity entity)

Parameters

Parameter Description
entity Type: Entity

A variable of a specific object type that represents the page.

Results

Result name Description
entity Type: Entity

A variable of a specific object type that represents the page. Contains the latest values that are present on the page after the record has been updated by the business logic or another concurrent process.

Faults

SOAP fault message Description
Other user has modified [record name]. Indicates that another user or process has modified the record after it has been retrieved for this update operation.
[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 update operation.
The [record name] already exists. Identification fields and values: [field]=[value] Indicates that the renaming of the record would violate key constraints.

Other faults are possible if they are generated by the C/AL code.

Usage Example

For a detailed code example, see Walkthrough: Registering and Using a Page Web Service (SOAP).

Customer cust = new Customer();  
cust.Name = "Customer Name ";  
service.Create(ref cust);  
cust.Name = cust.Name + "Updated";  
service.Update(ref cust);  

See Also

Basic Page Operations