Related Object Lookup Using the SOAP API
You can use a related object lookup to set the internal ID of any related object indirectly when you add, update or upsert an object if you know the external ID or the name of this related object. To do so:
-
Use the following argument object property.
Name
Type
Description
attributes
oaFieldAttribute[]
A collection of
oaFieldAttribute
objects.Note:Most business object types except those used as substructures such as
Address
,Date
, andModule
support theattributes
property. -
Create a collection of
oaFieldAttribute
objects. -
For each object property referencing related object(s) by internal ID you want to set indirectly using a lookup.
-
Add one object to the collection of
oaFieldAttribute
objects. -
Pass the external ID or name instead of the internal ID, or a comma-separated list of external IDs or names instead of Internal IDs as property value.
-
Sample codes: Update Using External ID as Foreign Key Lookup — C# and Modify with Foreign Key Lookup — Java.
oaFieldAttribute
The SOAP API uses a oaFieldAttribute
object as a substructure to define a related object lookup.
The oaFieldAttribute
object has the following properties:
Property |
Description |
---|---|
|
Specifies the foreign key.
|
|
Specifies the object property referencing related object(s) by internal ID, the related object type, an optional flag indicating whether object property value referencing related object(s) by internal ID is a comma-separated list. Format (single internal ID):
Format (multiple internal IDs):
where |