Dataport into General Journal

MinatoMinato Member Posts: 8
Hi,

I am attempting to enter data into the general journal using a dataport. I validate the account no on the OnBeforeImportRecord in order to get the preset posting groups.

However, I also want to import a global dimension and a description different from the account name. The validation of the account no is deleting the imported value in case of the dimension and replacing it by the account name in case of the description.

Any ideas on how I could solve this?

Comments

  • ara3nara3n Member Posts: 9,256
    Hello.

    Dataports do not work properly in navision.

    Rather use Integer as Dataitem and variables as DataFields.

    Then onafterimportrecord trigger

    write code to create the genjournal.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • MinatoMinato Member Posts: 8
    Well, I'd like to use the dataport as I am not too familiar with writing code in Navision. Any ideas, how I could get that working?
  • SavatageSavatage Member Posts: 7,142
    here's post , I can probably post a hundred links but if you simply search the forum for "Dataport" & "Variables" you will get a ton of hits and useful info

    here's one to start
    http://www.mibuso.com/forum/viewtopic.php?t=23061
  • MinatoMinato Member Posts: 8
    Thank you, Harry!

    I found one of your earlier posts which was really helpful.
  • MinatoMinato Member Posts: 8
    In addition to the above, I would like the dataport to create a default number according to the numbering setup in my batch. Is that possible? What would the function be?

    I tried validate("Document No.") in various triggers without any succes.

    Thanks for any help!
  • jonsan21jonsan21 Member Posts: 118
    Since you don't want to write any code, why don't just port the 'Document No.' altogether, and then set the 'No. Series' Last No.' back to the latest 'Document No.' ?

    Rgds,

    Jon.
    Rgds,

    Jon.
  • MinatoMinato Member Posts: 8
    Thanks Jonsan.

    I tried that before, but as it's not allowed to add manual number series to journal entries that doesn't really work. I would have to keep track of the numbering outside of Navision, which can be a bit hard as there might be adjustments between the imports. Or I am getting this completely wrong :roll: ??

    That's why I thought it's easier to get the current number from the system...

    Any other suggestions? :-k
  • jonsan21jonsan21 Member Posts: 118
    I thought you're going to port to a journal? hence the batch name should be unique. Just make sure no one else is using that particular batch. To enable the manual no series temporarily, just 'tick' the manual field in the no. series. There're a lot of ways, but you said no coding...

    Rgds,

    Jon.
    Rgds,

    Jon.
Sign In or Register to comment.