Table of Contents

Search

  1. Preface
  2. Overview, Downloading, and Installing
  3. Administration API
  4. Identity Service API
  5. Screenflow Programming and SDK
  6. ActiveVOS WSHT API
  7. Embedding Request Forms in Standalone Web Pages
  8. XML-JSON for Process Central

APIs, SDKs, and Services

APIs, SDKs, and Services

Read

Read

The read operation reads an entity using its object Id and object type. This operation can only return a result of a single object for the ID supplied. In addition, only the fields requested in the read request are returned in the read response. The following code example provides a simple read request message where the
FirstName
,
LastName
, and referenced
AccountName
fields are requested for a single contact from the
contacts
objectType.
Code Example: Read Message
<avosHost:read name="$default" objectType="contacts"> <avosHost:id>925cdc8b-f8e5-467e-ad1b-9270afb97b8f </avosHost:id> <avosHost:field>FirstName</avosHost:field> <avosHost:field>LastName</avosHost:field> <avosHost:field>AccountId2.Name</avosHost:field> </avosHost:read>
In the case of the sample project, this request is to the following SQL statement:
SELECT c.FirstName, c.BusinessPhone, a.Name FROM contacts c INNER JOIN accounts a on c.AccountId = a.AccountId WHERE c.ContactId = '925cdc8b-f8e5-467e-ad1b-9270afb97b8f'
Code Example: Read Response Message
The response message shown in the next code example returns the requested fields along with the
objectId
of the object that was read. Each
fieldValue
specifies the name of the field along with the field value as a text node.
fieldValue
elements can supply a
displayName
attribute with a Boolean value specifying if the field can be used in place of the
ObjectId
when rendering the object on screen. If the metadata description for the object being read defines a
fieldForDisplay
attribute, the read response should return a
fieldValue
with the
displayName
field's attribute
<types1:readResponse id="925cdc8b-f8e5-467e-ad1b-9270afb97b8f" name="$default" objectType="contacts"> <types1:fieldValue name="FirstName">Mark</types1:fieldValue> <types1:fieldValue name="BusinessPhone">111-222-5555</types1:fieldValue> <types1:fieldValue displayName="true" name="LastName">Ford</types1:fieldValue> <types1:fieldValue name="AccountId2.Name">Acme Inc.</types1:fieldValue> </types1:readResponse>

0 COMMENTS

We’d like to hear from you!