Last updated: 2024-06-07
Referring Objects/Properties
SmartIntegrator provides an option to refer objects/properties in the same request. The user can refer to the object based on its reference ID. A property of the object can be referred to as @ReferenceID.PropertyName.
Using @ReferenceID without a property name retrieves the ID of the object.
The following example uses the insert operation to add a contact object to the database as well as a SmartPad note object. The refid="john" attribute of the Contact element assigns a reference to the object. That reference is then used to create a SmartPad object linked to that contact.
XML
<request version='1.0'>
<header>...</header>
<insert>
<Contact refid="john">
<LastName>Doe</LastName>
<FirstName>John</FirstName>
<Title>Dr</Title>
<TaxID>111111111</TaxID>
<Person>
<Dob>1950-02-27</Dob>
</Person>
</Contact>
<SmartPad>
<Keywords type="ref">@john.TaxID</Keywords>
<Note>How are you?</Note>
<ContactID type="ref">@john</ContactID>
</SmartPad>
</insert>
</request>