Show TOC

Transaction Type: EditLocate this document in the navigation structure

An edit transaction is defined to allow the user to edit the property values of an existing object instance on the Agentry Client. This type of transaction should, at a minimum, include the key property of the object type and all property values that should be changed in the object.

It is highly recommended that users never be allowed to edit the key property of an object, as this can make it difficult, if not impossible, to update the enterprise system with any other changes for the object. Remember that the key property of an object is the value that uniquely identifies that object within both the mobile application and the enterprise system.

When an edit transaction is applied, the value of the properties are copied to the object properties they target. These new values will replace the previous values of the object properties. Object properties not modified by the transaction will not be changed. Once an object property is updated from an edit transaction, the previous value of that object property is lost and cannot be recovered.

When designing and developing an Edit transaction, the developer should consider whether or not the transaction definition should include merge functionality. Transaction merging is the behavior when an instance of an edit transaction is merged with an existing pending transaction targeting the same object instance on the Agentry Client. This functionality is controlled by the Edit transaction’s merge attributes and is optional behavior.

Edit Transaction Attributes
Following are the attributes for an edit transaction:
  • Type: This attribute specifies the type of transaction. For edit transactions this is set to Edit. This attribute cannot be changed once the transaction has been defined.
  • Object: The Object attribute specifies the type of object the edit transaction targets on the Agentry Client. This may be set to any object type defined within the same module.
  • Name: This is the identifier for the transaction definition. This value must be unique among all transaction definitions within the same module.
  • Display Name: The display name is the value shown to users for the transaction on the Client. This is normally seen by the user in the Client’s Transmit Screen when an instance of the transaction is sent to the Agentry Server to be processed.
  • Key Property: This attribute specifies the property within the transaction to be treated as the key property. This is almost always the transaction property that targets the object’s key property and is set as such by default.
  • Merge When: This attribute specifies when the transaction should be merged. This can be set to either “Merge with adjacent transactions only” or “Merge with any transaction” to enable transaction merging on the Client. Adjacent transactions means the last transaction applied on the Client. Any transaction means the transaction will be merged with the first transaction found to meet the proper criteria for merging. This begins with the most recently applied transaction for the same object instance. The search continues back to the first applied transaction, or until a transaction is found that the edit transaction can be merged with.
  • Merge With: This attribute specifies the type of transaction the edit transaction should be merged with. This can be set to “Same transaction type only” or “Similar transactions.” The same transaction type is only another instance of the same edit transaction that targets the same object instance on the Client. A “Similar transaction type” also must target the same object instance on the client, but may be an instance of any add or edit transaction that meets the merge criteria.
  • Timestamp: The timestamp can be set to either “New Timestamp” or “Original Timestamp.” This attribute specifies whether the timestamp from the original transaction is kept after the merge, or whether the timestamp from the new transaction instance is used.