Dataport Validation

Hi there,

It is the first time I work with dataports, and I need to create dataports for

Customer/Vendor/Fixed Assets/Stock Import

Opening Balances/Stock Opening Balances/FA Opening Balances

Sales History for two years

I dont know how to do validation on these dataports and do not know if it would import correctly if I dont do validations. Could you please help me?

Hi,

Create Dataport as customer and validation for No. after Export record.

e.g.: Customer - OnAfterExportRecord()
Customer.VALIDATE(“No.”);

like you can add validation.

You can also set the CallFieldValidate property on the DataPortFields to YES. That’s if you’re importing directly to the table. Here it’s important to have the fields in the right sequence. The field sequence in a dataport should be based on how a user would manually enter the data. Not on the order in the table.

Thank you very much for your answers. Do I need to validate anything else for opening balances?

Hello,

You have 2 types of dataports you want to consider:

  1. Master Tables, ie Customer/Vendor/Fixed Assets/Items/GL Accounts. These require a unique Identifier “No.” and a “Posting Group”
  2. Entries ie Opening Balances/Inventory opening Balances/FA Opening Balances. These will require the records from the master tables in 1. and they will need to be imported into thier respective Journals and then POSTED

You will need to learn how the posting rutines work before you post any journal.

Hope this helps,

Thanks!

Hi Marianne,

This may not be 100% correct, but what I always do is validate the fields in sequence as you entered manually in the form. So far it works for me… :smiley:

Regards,

-TR-

You can be 100% sure by studying how the validate cascade goes. I suggest you read these blog posts I wrote on this:

  • Validating Data #3: Cascading VALIDATEs
  • Validating Data #5: Data- and XMLports

Fo sure do NOT validate every field by default. Find out wich one are really needed. Be SMART.

Thank you very much!