Which Method to Use

Whilst the function of most component methods is self-explanatory, for example, using the Delete method to delete data, this section describes others that may not be so clear.

Create

This method only creates data. If the data already exists, an error message is produced and the payload rejected.

Amend

This method only amends existing data. If the data does not exist, an error message is produced and the payload is rejected.

CreateOrAmend

This method creates data if it does not exist already and amends it if it does. Whereas the Create and Amend methods depend on you to know whether the data does or does not exist in advance, this method can be used if you are unsure.

BulkCreateOrAmend

Not all components have this method. For those that do, it can be used for the bulk loading of data or bulk amendment of data. As these all use the DJI driver, they run much faster than the others described above. For bulk loading, this can be an important consideration.

CreateReplaceOrDelete

This method is used to synchronize business unit data. It creates data if it does not exist already, and replaces it if it does. If the data does not exist in the originating business unit, it is deleted.

GenerateAndMatch

This method generates a Purchase Invoice and matches it to a specified Purchase Order.

Match

This method allows you to match a purchase invoice line to a purchase order line.

Query

In addition to providing a query function, allowing you to query the values of existing data, the Query method can also be used to extract data from the SunSystems database. This allows you to 'round-trip' data; to extract data, amend values within the results returned and then import the amended values back into the database by either an Amend or a CreateOrAmend method.

注意:Some components do not allow 'round-tripping' due to database integrity constraints. These exist to ensure the data is always consistent with other related data that may be present.

Process

This method allows you to run a process whilst carrying out other work at the back end. For example, you create a process profile using Ledger Revaluation as the Target Component. When you run the profile, Journals that fulfill the criteria defined in the relevant Ledger Revaluation Profile are retrieved, executed and run. A report that consists of the ledger revaluation details is generated.

注意:Several components have process methods that generate reports. Whereas SunSystems prompts you for the reporting option (whether to Print, Store or View), SSC only allows Print or Store to be used. The SSC default is Store. The report, by default, is stored in the SunSystems \Output folder. You can change this location at run time.

RangeDelete

When provided, this method allows you to specify a range of records to delete.