JS Client API
  • Getting Started
  • Rule Engine Unique Functions
  • Custom Form Window Functions
  • Known Issues
  • Use Cases & Code Samples
  • Retrieving Data
    • Retrieving Standard Resources
    • Retrieving User Defined Tables
    • Retrieving Attachments
    • Retrieving Items in Transaction Scope
    • Retrieving Transaction Lines
    • ADAL
  • Updating Data
    • Adding Objects to Standard Resources
    • Updating Standard resources
    • Updating User Defined Table
    • Updating Items in Transaction Scope
    • Adding Transaction Lines
    • Removing Transaction Lines
Powered by GitBook
On this page

Was this helpful?

  1. Updating Data

Adding Objects to Standard Resources

Supports the following resources : accounts, transactions, activities and contacts

Coming Soon (CPI V 16.0)

Adding a Single Object

  1. The account field of the references object is mandatory (except for the accounts resource) and it supports UUID and InternalID.

  2. The type field is mandatory for transactions and activities, while for accounts and contacts the type field is not mandatory - and if not provided the object will be created with the default type.

  3. The type object should contain either type id or type name (when both are given the ID takes affect)

  4. For transactions,activities and accounts - originAccount(transaction and activity only) and catalog fields can be assigned to define this type of relation, in the following restrictions:

    1. originAccount - supports InternalID and UUID.

    2. catalog - supports InternalID, UUID, and catalog Name.

    3. catalog - is mandatory for accounts, activities and transactions that have multiple catalogs.

  5. In case of objects that has Workflows transitions - the object will be created in the "new" status, with the New>>{Next Transition Step} initialized.

Example:

pepperi.app.<resource name>.add({
    type: { InternalID: 1234 , Name : "Sales Order"} ,
    references: { account: { UUID: "" } }, // Optional: {originAccount: { UUID: "" } // Optional: {catalog: { UUID: "" }
    object: {GrandTotal: 567.5 ,TSASubject:"This Object was created with the client api"}
})

Returns:

{
  "success": true,
  "id": "6e2803cd-b656-4d4f-8d21-f7cee7167350",
  "status": "added",
  "message": ""
}
PreviousADALNextUpdating Standard resources

Last updated 5 years ago

Was this helpful?