Help! An error message when exporting a book to AFAS

Help! An error message when exporting a book to AFAS

Are you using the AFAS Webservice and aren’t you able to export the Cash & Card book to AFAS due to an error message? This can have several causes. 


The cause is often translated into an error message, which you can see in the action report. This error message is a direct response from AFAS and can inform you why the export of the book failed. Unfortunately the error message doesn’t always clearly state what needs to be corrected in order to successfully export the book. 

In this article we have collected several error messages with the possible cause and solution.

The mentioned numbers are random examples.

  1. Error Message: General message: There is no assignment for cost center '10575' with account '4108' or the assignment is blocked.
Possible Cause: There is no link or connection between the mentioned cost center '10575' and account '4108' in the system, or the existing link is blocked.
Possible Solution: You need to establish a link or assignment between these values within the AFAS system. Alternatively, you can choose different values for the booking.


  1. Error Message: General message: Cost center assignment is required for account 132190.
Possible Cause: No cost center has been specified for the booking, but it's required for the selected account number 132190 in the AFAS system.
Possible Solution: You must fill in a cost center for the booking associated with account number 132190. If necessary, consider selecting a different account number that doesn't require a cost center in AFAS.

  1. Error Message: (AntaObject) There is no value entered in the mandatory field 'Rekeningnummer' (AcNr).
Possible Cause: A mandatory account number is missing in the booking sent to AFAS. This often happens with VAT-related account numbers.
Possible Solution: Check within the Application Management whether the VAT codes used also contain the required account number. Ensure that the appropriate account number is provided when booking.


  1. Error Message: (AntaObject) The foreign key does not exist in the database. FieldId=Rekeningnummer, ForeignKeyId=KnAnt1
Possible Cause: AFAS does not recognize or find the contra account number specified in the booking.
Possible Solution: Verify the contra account specified in the booking within the Spend Cloud. It's likely that either no contra account has been provided, or the provided account is incorrect. Correct this as needed.


  1. Error Message: (AfasFiEntry) VAT is mandatory for account 45221.
Possible Cause: VAT is required for the specified account number 45221 within the AFAS system.
Possible Solution: Ensure that the VAT information is provided when booking with account number 45221, as it is mandatory. Alternatively, choose a different account number that doesn't require VAT within AFAS.


  1. Error Message: (AFASFiEntry) VAT is not allowed for account 45221.
Possible Cause: AFAS does not accept the VAT code used in the booking for account number 45221.
Possible Solution: Check within AFAS whether the selected VAT code is compatible with account number 45221. Ensure that no VAT is applied when using account number 45221 if it's not allowed within AFAS for this account.

  1. Error Message: Bank book-/card book name - 01-2023 - Invoice number must be entered on each line for purchase/sales journal entries.
Possible cause: The filled journal number of the book is of the type Purchase.
Possible Solution bank book: Make sure that you fill in a journal number with type Bank within the bank book settings.
Possible Solution card book: Make sure that you fill in a journal number with type Memorial (variabel) within the card book settings.


    • Related Articles

    • Help! An error when exporting a book to Twinfield

      Are you using the Twinfield Webservice and aren’t you able to export the Cash & Card book to Twinfield due to an error message? This can have several causes. The cause is often translated into an error message, which you can see in the action report. ...
    • Help! An error when exporting a book to Exact Online

      Using a Web Service and Unable to Export a Book to the Financial Package Exact Online? If you are having trouble exporting a book to the financial package Exact Online using a web service, there could be various causes. The cause might be translated ...
    • Help! An error when exporting a book to Exact Financials

      Using a Web Service and Unable to Export a Book to the Financial Package Exact Financials? If you are having trouble exporting a book to the financial package Exact Financials using a web service, there could be various causes. The cause might be ...
    • Help! An error when exporting a book to Visma.net Financials

      Using a Web Service and Unable to Export a Book to the Financial Package Visma.net Financials? If you are having trouble exporting a book to the financial package Visma.net Financials using a web service, there could be various causes. The cause ...
    • Help! An error when exporting a book to Exact Globe

      Using a Web Service and Unable to Export a Book to the Financial Package Exact Globe? This issue can have several causes. The cause might be translated into an error message that you can see in the export report. This error message is returned by the ...