Dataport

jglaisherjglaisher Member Posts: 2
Using Navision 4.0 SP3:

I am trying to find out if it is possible to run a dataport to import values into the Gen. Journal Line Table, however, during the import, I need to validate information from another table to find out if the import is accurate.

Gen. Journal Line table import contains "Job No.", "Job Cost Type", and "Account No." fields. These fields are also found in the Job table and I need to look up the "Job No." and "Job Cost Type" fields from the import, find the record in the Job table that contains them, and return the "Material Cost G/L Account" or "Labour Cost G/L Account" field to compare with the "Account No." being imported. (this is being done purely to verify that the import file contains the correct G/L code for the job type being performed).

Sample import:

Job No.: 123
Job Cost Type: Labour
Account No.: 555-555-5555


Sample Job Table:

Job No.: 123
Materials Cost G/L Account: 555-555-5555
Labour Cost G/L Account: 555-555-5556

So the import process would state that "Job: 123 with Labour: 555-555-5555 is an invalid G/L account"

Is this possible within a Dataport, and if so, can someone point me in the right direction? It would be much appreciated!

Regards,

Jonathan

Comments

  • kinekine Member Posts: 12,562
    You can do within dataport anything you can do in the C/AL. Just select the proper trigger and write your validating code...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • abhinav0408abhinav0408 Member Posts: 35
    You have to validate your calcfeilds either by Validate function on proper trigger or you can set your calcfeilds property to "Yes" on Dataport feild property
  • kinekine Member Posts: 12,562
    You have to validate your calcfeilds either by Validate function on proper trigger or you can set your calcfeilds property to "Yes" on Dataport feild property
    Calcfields? About what you are talking?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • abhinav0408abhinav0408 Member Posts: 35
    While importing through Dataports Calcfeilds might not validate properly.So we have to validate them with the help of code
  • kinekine Member Posts: 12,562
    Sorry... wrong thread...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • SavatageSavatage Member Posts: 7,142
    I would import them into variables And map them back to nav fields in the order you usually enter a line manually

    validating those that need validation
Sign In or Register to comment.