Topic
Custom Attributes in SOAP
Topic posted June 19, 2012 by Stuart Concannon
161 Views, 1 Comment
Title:
Custom Attributes in SOAP
Content:
Hi
Using a standard CONTACT object with SOAP to perform a GET, would give you an array of custom fields (matching those custom fields setup). However, a custom attribute added via the Custom Object Designer for the CONTACT record, eg CO$TestField, does not appear in the custom field array.
My question is how do you retrieve the value if this via a GET in SOAP?
Thanks. Stuart
Answer
Hi Stuart,
The answer depends upon which version of Connect you are using. This is indicated by which WSDL you bound to and the namespace you use. In version 1.1 custom attributes were found in the field CustomAttributes and that field is specify-to-get. In your "GET" request add an empty field called CustomAttributes (typically an empty but allocated GenericObject assigned to this field is sufficient). This lets the server know that you are interested in that sub-object and it will return the data associated with all the CustomAttributes for that object.
In version 1.2 the CustomAttributes field and the CustomFields field were combined into a single CustomFields field. The old custom fields are placed into a package called "c" (lower case "c"). Otherwise the new CustomFields acts like the old CustomAttributes field and is specify-to-get. Just set the CustomFields to an empty GenericObject and the server will return all the custom fields for the object.
Regards,
-Allan
Be the first to rate this
|
Sign in to rate this