CRUD QDocs
QDocs that request basic create-read-update-delete (CRUD) maintenance against some QAD Enterprise Applications business object are very common. Because of their ubiquity, a single format is used for all of them along the lines of the signature standards defined for the service interface and QAD JIT Sequencing APIs.• All QDocs requesting CRUD activity on an QAD Enterprise Applications entity are named using the verb maintain (for example, maintainSalesOrder, maintainSupplier). This terminology keeps the QDoc names relatively close to the QAD Enterprise Applications menu procedures whose functionality they incorporate.
• At the beginning of every complex XML element that denotes a business object to be maintained (for example item, salesOrder, supplier), an operation element describes the type of maintenance requested for the object. Allowed values are A (add), M (modify), D (delete), G (get), S (sync), N (no-op).
• Sync indicates that the object should be added if not present in the database and modified if present, essentially the same way that QAD Enterprise Applications maintenance procedures currently work.
• Add raises an error if the object already exists.
• Modify raises an error if the object does not exist.
• No-op is a special value signifying that the element should be skipped; it may be useful for cases in which the value of some QDoc element helps navigate to or access subsequent elements, but for which no processing is required.
Operation elements can exist at multiple levels within a QDoc, such as the order header, line, and transaction comment levels.