Jaa


ReadByRecId Operation

Reads the record that is identified by the record ID.

Method Signature

Entity ReadByRecId(string formattedRecId)

Parameters

Parameter Description
formattedRecId Type: String

The RecId that is used to read the record.

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.

If the record is not found, then the operation returns null.

Faults

This operation does not return a fault when a matching record is not present. Instead, it returns null. In C#, you should test whether the result is a null reference. Otherwise, you may get a NullReferenceException exception.Faults are possible if they are generated by the C/AL code.

Usage Example

public void ReadById(String id)  
{  
  Customer_Service service = new Customer_Service();  
  Customer cust = new Customer();  
  service.UseDefaultCredentials = true;  
  cust = service.ReadByRecId(id.ToUpper());  
}  

See Also

Basic Page Operations