Audit Logs ATTENTION: This feature will soon be deprecated. It is recommended to use the Changelog to view object change history. In a Nutshell Audit tables log changes in tables in company databases. For example, audit.Activity contains a new row for each change that has been done on each row in the activity table. Audit tables can be queried using the Admin Query API. Historical audit tables are available for the following DTOs: Supported Data Objects Model Versions Description Activity 13, 14, 15, 16, 17, 18 This is a common used object for different purposes, which has the special ability to have linked attachments (see Attachment). It is used for several cases like meetings, service task planning and appointments to store reminder, start and end date (see ActivityType.MEETING). After a meeting or engagement on customer side it is usually the case that there are some notes to be taken, so the next visitor has the full history about what is going on (see ActivityType.NOTE) In case of one had a call with a customer, there is the possibility to create an activity of an according type to make some notes that this phone call happened and what the content was (see ActivityType.CONVERSATION) Activities can be linked to objects (see object parameter) of different types like: Opportunities; ServiceCalls; SalesQuotation; SalesOrder; BusinessPartner. Approval 10, 11, 12, 13 This object provides the ability to let users approve or decline requests assigned to them. As there are not all objects available on the devices there might exist approval cases we not even considered. We decided to give you a big remarks field, where one can put all the necessary decision information like order lines, discounts, etc. In addition there are predefined links for business partner and objectId/objectType referencing available which can be used to link to a document the user has permission for. For each assigned person, there exists a separate approval object - not like the alert where one alert has multiple receivers. Attachment 12, 13, 14, 15, 16 Attachment represents a binary file together with name, description and a reference to any other object. This object gets usually linked to activities where one can attach photos and audio notes or even pdf documents and other documents (depending on the client). This can be useful to transmit manuals or weekly detail reports to the field people. BusinessPartner 16, 17, 18, 19, 20 This object is a general representation of companies or customers. This is related to the basic system (e.g. SAP B1, SAP ECC, MS Dynamics CRM, ...). The businesspartner type indicates the kind of relationship to this company. For more information about types @see BusinessPartnerType. Contact 12, 13, 14, 15, 16 Contact represents related persons (e.g. employees) of a business partner. CustomRule 8, 9 The rules binds an event, conditions and an action. Equipment 14, 15, 16, 17, 18 Equipment is a specific item or machine installed on customer side with a certain address and serial number. The address of an equipment is indicated by a address object which points to the equipment. Expense 12, 13, 14, 15 This object represents expenses during travel like lunch, fuel, etc. Expenses are always assigned to a type which can be personal or per object or general. Invoice 11, 12, 13, 14 Represents a invoice with all the necessary properties including net prices, gross prices and taxes. Invoices can only be created on business partners of type CUSTOMER and can only contain items with flag "salesItem" set to true. Item 17, 18, 19, 20, 21 The item object represents the data of the item master data also called articles in some systems. Material 14, 15, 16, 17, 18 This object is used while a field technician is working on a service call and needs some material from his car stock. After technician fixes an issue on customer side,he creates a material object for each item used. Mileage 12, 13, 14, 15, 16 This objects is meant to enter mileage for traveling to customer. Person 15, 16, 17, 18, 19 Person represents the employees, users or sales employees of a company. A physical person can have up to 3 different entries like: Person A, ERPUSER Person A, EMPLOYEE Person A, SALESEMPLOYEE --> these 3 entries are then linked together by using the property refID which indicates a physical person. For this object common sense properties are not specially documented. Special for this class is that OWN permission is filtered by the person's id. PurchaseOrder 11, 12 Represents a purchase order with all the necessary properties including net prices, gross prices and taxes. Purchase ordres can only be created on business partners of type SUPPLIER and can only contain items with flag "purchaseItem" set to true. SalesOpportunity 12, 13, 14, 15 SalesOpportunity is a business object that represents the sales opportunity data. Sales Opportunity include potential sale volumes that may arise from business with customers and interested parties. SalesOrder 13, 14, 15, 16, 17 Represents a sales order with all the necessary properties, including net prices, gross prices and taxes. SalesOrders can only be created on business partners of type CUSTOMER or LEAD and can only contain items with flag "salesItem" set to true. SalesQuotation 12, 13, 14, 15, 16 Represents a quotation with all the necessary properties including net prices, gross prices and taxes. SalesQuotation cannot be created on business partners of type SUPPLIER, CUSTOMER or LEAD and can only contain items with flag "salesItem" set to true. SalesStage 10, 11, 12, 13 The SalesStage object enables to define sales stage and their probability percentage. For example: Lead, Meeting, Quotation, Negotiation, and Order. These definitions are used as default values for the SalesOpportunity object. ScreenConfiguration 8, 9, 10, 11 Class for storing screen configuration. ServiceCall 14, 15, 16, 17, 18, 19, 20, 21 Service call or ticket which indicates a request from customer to a certain problem or service. ServiceContract 8, 9, 10 Contracts are agreements between the Customer and Vendor to supply materials/services for a specific price between a fixed period of time. TimeEffort 11, 12, 13, 14, 15 This object represents efforts one does for a specific customer. In usual cases efforts can be charged to the customer and bring money to the company doing the services. TimeEfforts can be booked on business partners, sales orders, sales quotations, opportunities, production orders, service calls and time projects. WorkTime 10, 11, 12, 13, 14 Work times are used to let the user enter the time he worked overall, not related to any services or customer support he did - it is just the come and leave statement including a break. Project 8 Used to reprsent a project. In addition, audit logs for UDFs/Custom Objects can also be queried using the Query API. Sample Queries The following are examples of queries of audit logs that can be executed in the Admin Query API. View Full Content of Given Table The following query could be used to show the history of a DTO supported in audit logs (in this example: Activity): SELECT aHistory from audit.Activity aHistory; View Record with Most Changes The following query you could view and sort records based on the number of changes in the audit log (in this example: Activity): SELECT COUNT(aHistory.lastChanged), aHistory.code FROM audit.Activity aHistory GROUP BY aHistory.code ORDER BY COUNT(aHistory.lastChanged) DESC LIMIT 1; View History of Specific Record The following query could be used to view the entire history of a specific record (in this example: Activity where aHistory code = '134' ): SELECT aHistory.code, aHistory.checkedOut, aHistory.status, aHistory.executionStage, aHistory.lastChanged, aHistory.equipment, aHistory.lastChangedBy FROM audit.Activity aHistory WHERE aHistory.code = '134' ORDER BY aHistory.lastChanged ASC; Viewing Object History containing Personal Data Data Proteection Officers may use the Admin Query API feature to view the audit log history of data objects containing personal data.