Diamant Connector

This Gebra Suite module allows to retrieve data from the Diamant Accounting Software and post data to it

Get Method

The Method Retrieves the data specified with dataType (like Address, CostCenter and so on). The searchParams and fieldMatch JSON properties are valid for all methods, but the fields mentioned in it are depending on the datatype used. For example: postcode is a valid searchParam for addresses, but not for cost centers.

The Get method will return the data it fetched from Diamant, so you get an array of JSON objects. The fieldMatch prameter will tell the Gebra Suite to change field names, so that it is more useful in an Gebra Suite environment.

Example Usages Get

This will retrieve all addresses from diamant. Field names are the original diamand field names

let result = await app.businessFunction({
  functionName: "Diamant",
  methodName: "Get",
  company: "9018",
  dataType: "Address",
});
console.log(result);

This will retrieve all addresses with Postcode 61118 from diamant and return the result. The fields postcode is changed to adrZip by the Gebra Suite and name1 is changed to adrName. All other fields are ignored and are not in the result set.

let result = await app.businessFunction({
  functionName: "Diamant",
  methodName: "Get",
  dataType: "Address",
  searchParams: {
    postcode: "61118",
  },
  fieldMatch: {
    postcode: "adrZip",
    name1: "adrName",
  },
});
console.log(result);

ImportTable Method

This method allows you to retrieve the data and insert it into the database. Query parameters work the same and are optional but you must user fieldMatch to assign diamant names to Gebra Suite field names

Example Usages Import Insert

This will retrieve all addresses from diamant and insert it into the table address the table will be wiped right before the import.

let result = await app.businessFunction({
  functionName: "Diamant",
  methodName: "ImportTable",
  dataType: "Address",
  tableName: "address",
  wipeTable: true,
  fieldMatch: {
    postcode: "adrZip",
    name1: "adrName",
  },
});
console.log(result);

Example Usages Import Upsert

This will retrieve all addresses from diamant and update the records with the same id as in fieldMatch.

let result = await app.businessFunction({
  functionName: "Diamant",
  methodName: "ImportTable",
  dataType: "Address",
  tableName: "address",
  upsert: true,
  wipeTable: true,
  fieldMatch: {
    key: "adrKey,id",
    postcode: "adrZip",
    name1: "adrName",
  },
});
console.log(result);

Supported dataTypes

More types can be added at request.

Request Data

  • Address (Adressen)

  • CostCenter (Kostenstellen)

  • GenLedgAccount (Sachkonten)

  • CostObject (Kostenträger)

  • PrimCostElement (Primärkostenarten)

  • Project (Projekte)

  • Company (Mandanten)

  • Customer(Konten)

  • Vendor (Vendor)

  • Posting (Buchungen)

Transctions

Last updated