One or more objects can be created or updated during a single call. An object's unique identifying attributes are used to determine whether or not a new object is being created. If an object with the identifying information is found, the data is updated. Otherwise, the object is created.
Multiple objects may be created and/or modified during a single call but the the array is restricted in that it may contain only one type of object. Although all editable LMS objects inherit from LmsObject, all elements of the lmsObjects array must be of the same derived type. Calling CreateOrUpdate while passing in mixed object types in the lmsObjects array causes an exception to be thrown, and immediate termination of the request with no processing of data.
The method currently supports the following types of objects:
Client applications must be logged in with sufficient privilege and access rights to create or modify individual objects passed in as part of the lmsObjects array.
Several objects contain fields referencing other objects. A client application must also be logged in with sufficient privilege and rights to access the objects referenced. Prior to manipulating a particular object, a developer should read the objects description in Firmwater LMS Objects.
Several Firmwater LMS objects contain fields that are automatically maintained. The method populates certain fields accordingly. Examples of fields that are automatically populated include CreatedDatetime, and UpdatedDatetime. The values for these fields cannot be explicitly specified. If a client application specifies a value for a read-only field that is automatically maintained, Firmwater LMS web service will ignore the specified value.
During a single CreateOrUpdate call many objects may be manipulated. Manipulation of objects occurs in an autonomous fashion. The results of manipulating two LmsObjects are mutually exclusive, that is, one action may succeed and one action may fail, but neither result affects the other and all objects passed in are processed regardless.
Every field has an associated data type. Values supplied must adhere to specifications for the field's data type as described in Firmwater LMS Web Service Data Types.
During a single CreateOrUpdate call a maximum of 200 objects may be manipulated. Any request to modify a number of objects greater than the specified maximum will be terminated immediately and no objects will be processed (the entire operation fails).
The following basic steps outline the creation of Firmwater LMS objects after successful authentication:
The same basic steps outlined for creating objects apply when updating Firmwater LMS object records. A Firmwater LMS object can be modified by setting the identifying fields and the fields to be updated. Required fields are not necessary if the object already exists. Fields that are not set will not be updated (except for Automatically Maintained Fields).