Add, change and delete purchase contacts (KnPurchaseOrg / KnPurchasePer UpdateConnector)

UpdateConnector to add, change or delete purchase contacts.

UpdateConnector name:

  • KnPurchaseRelationOrg (for organisations)
  • KnPurchaseRelationPer (for persons)

    Note: 

    You can use this UpdateConnector to add or change one contact person. You cannot add/change multiple contact persons at the same time!

    If you want to add contacts, delivery addresses and departments for an organisation, you use the 'KnOrganisation' UpdateConnector.

    Note: 

    You can retrieve a list of fields to be supplied for each UpdateConnector and generate an XML example. See the description for AFAS Online or for a local installation.

Contents

Preparation
Description

Actions that can be performed with the connector

Action

Comment

INSERT

Add a purchase contact

Download an XML example file

UPDATE

Change a purchase contact.

Download an XML example file (change address)

Download an XML example file (change bank account number)

DELETE

Delete a purchase contact.

You can only do this if there are no more associated data, such as sales invoices, outstanding items or entries. If this is in fact the case, you can block the purchase contact.

Points of attention:

  • UPDATE sales contact
  • In the case of an UPDATE, use the code of the purchase contact (field: 'CrId').
  • UPDATE organisation or person

    In the case of an UPDATE of linked organisation or person details (in the 'KnOrganisation' or 'KnPerson' segment), you must also specify a unique key for the organisation or person. Use the code of the organisation or person for this purpose and specify the correct value in the 'MatchOga' field.

    You can derive the code of the organisation or person based on the number of the sales contact. To do so, you use operator 9 in the 'MatchOga' field (for organisations) or the 'MatchPer' field (for persons). You cannot specify a value in the 'BcCo' field.

  • A new organisation or person is added to the file of organisations and persons. You can link a purchase contact to an existing organisation or person by delivering a value in the 'BcCo' field.
  • One or more addresses are added to the organisation or person.

Purchase contacts can only be deleted if no (financial) entries are present for the purchase contact.

A purchase contact is always an organisation or a person. Therefore, you need to create an organisation or person immediately when you add a purchase contact.

See also the remarks for the connectors for organisations and persons.

Mandatory and optional objects in the XSD Schema Tool

If you use the XSD Schema Tool to generate an XML file, the XML file contains the following objects:

Debtor (M)

KnOrganisaton (M)

KnBankAccount

KnBasicAddressAdr (M)

KnBasicAddressPad (M)

KnContact

KnBasicAddressAdr (D)

KnBasicAddressPad (D)

Kn Person (D)

KnBankAccount

KnBasicAddressAdr (D)

KnBasicAddressPad (D)

The meanings of the codes for the segments:

  • M: Mandatory
  • D: Depends on another object. When you deliver certain objects, their associated segments are also required.

Purchase contact code (in case of INSERT)

Field: CrId

If you run an INSERT, you add a sales contact with the provided code. If you do not deliver a code, the code can be determined automatically based on the auto numbering of purchase contacts, provided this has been recorded.

Is creditor

Field: IsCr

If this field has the value 'True', this means that the purchase contact is regarded as a creditor. This means extra fields become mandatory, such as the 'PaCd' and 'VaDu' fields.

Mandatory fields

You must provide values for the following fields even though these fields appear as optional fields in the XSD Tool.

  • PrLi (Line discount)
  • PrFc (Invoice discount)
  • ClPc (Credit restriction)
  • PrPt (Payment discount)
  • KrLi (Credit limit)

For these fields, you can deliver the value zero.

Addresses

  • In an address, you must always enter the country code in the 'CoId' field.
  • Deliver the fields that are needed for a complete address (this depends on the properties of the country code).
  • For the first address (in practice, for a new record), you do not need to deliver a start date in the 'BeginDate' field. If an address already exists, use 'BeginDate' to indicate the effective date of the address change.
  • If the 'ResZip' field has the value 'True', the system looks up the city for the postal code entered. In this case, you do in fact still need to enter a city in the 'Rs' field. If the system cannot find a city for the postal code entered, it uses the value entered in 'Rs' for the city.

 Bank account number

You specify a bank account number for a person or organisation in the 'KnBankAccount' segment. You can provide an IBAN number or a bank account number (old style).

  • IBAN number

    Specify the following fields:

    • CoId: country code
    • Iban: IBAN number
    • IbCk: IBAN number check
  • Bank account number

    Specify the following fields:

    • CoId: country code
    • BaAc: bank account number. The bank account number should have 10 positions. For a 9-position bank account number, you must add a leading zero.

If you supply an IBAN bank account number, Profit determines the BIC code automatically. This only happens if the following conditions are satisfied:

  • The bank account number is a Dutch account number.
  • The BIC code has not been entered in the XML or in Profit.

Preferred bank account number / 'G' account

A purchase contact can have multiple bank account numbers and 'G' accounts. That is why you have to specify a preferred bank account number and 'G' account in the properties of a purchase contact (Payment tab).

You can also specify these preferred accounts using the UpdateConnector. The first bank account number you supply is set as the preferred bank account number. The first 'G' account you provide, is set as the preferred 'G' account.

Directly to

  1. UpdateConnector descriptions