CustomCollectionEntryUpdated

Smile emits this message when an existing collection entry is modified.

Message header

The following table lists the parameters in the CustomCollectionEntryUpdated message header.

Table 1. CustomCollectionEntryUpdated header parameters
Parameter Type Values
companyId integer Company that the custom collection entry belongs to
key integer Unique custom collection entry key that identifies the entry being updated
smileMessageType string "CustomCollectionEntryUpdated"
collectionCode string Code name of the collection possessing the entry that this message concerns
entryCode string Code name of the collection entry that this message concerns

Message body

The root element of the message body is <CustomCollectionEntry> and has the following format:
{http://xml.inomial.com/smile/2.xsd}CustomCollectionEntry

The message body always reflects the latest (post-operation) state of the custom collection entry.

In the event of a custom collection entry's entryCode being renamed via updateCollectionEntry(), both the entryCode header property and <EntryCode> element will contain the new name, but the key will always remain the same, allowing you to identify which collection entry has been renamed.

It should be noted that the objectId="..." attribute of the <Object> element is purely intended for Inomial's own diagnostic reference, and is not intended to be used by third-party developers.

If the values of the objectId="..." and top-level key="..." attributes appear identical, this is purely of coincidence, and merely a side-effect of the underlying storage system used in Smile. You should not rely the value of the objectId="..." attribute as Inomial reserves the right to alter the way this attribute is generated in future versions of Smile without notice.

Example: The <CustomCollectionEntry element

This example shows an CustomCollectionEntry XML document that contains the <CustomCollectionEntry> element.

<CustomCollectionEntry key="6564" xmlns="http://xml.inomial.com/smile/2.xsd">
  <CollectionCode>products</CollectionCode>
  <EntryCode>MobilePhoneModel</EntryCode>
  <Object objectId="6564" formId="1156" displayName="iPhone 6S (Silver)">
    <String name="productCode">iphone6s</String>
    <String name="productDescription">iPhone 6S</String>
    <String name="colour">Silver</String>
  </Object>
</CustomCollectionEntry>