Odata General Journal - issue when saving changes to the NAV database when I setup a batch name

jeqdevjeqdev Member Posts: 8
edited 2017-03-21 in NAV Three Tier
Hi,

I have exposed an Odata web service in NAV to read and write General Journals, I am using the default page 39 - General Journal. Everything seems to work fine if I set the Journal."Journal Template Name" := 'GENERAL' and the Journal."Journal Batch Name" := 'CASH', the issue comes when I try to use a different "Journal Template Name" or Journal."Journal Batch Name".

I get the following exception error: "The Gen. Journal Line already exists. Identification fields and values: Journal Template Name='GENERAL',Journal Batch Name='CASH',Line No.='10000'". If I inspect the collection of entities in the DataServiceContext just before calling SaveChanges it looks like it contains the values I have set up. However, when calling SaveChanges it seems to ignore my the changes in the Journal Bach Name field.

I am wondering if it is supported, or if there is any way of fix this issue using any other standard NAV page.

I would appreciate if anyone could help me with this issue.

Many thanks!

Answers

  • gunslingerdouggunslingerdoug Member Posts: 1
    THIS! Dude, I've been having this same issue. I cannot track down why the ODATA only has a reference to the DEFAULT Journal Batch. You can change the DEFAULT to another one manually in NAV, but you still can't write to anything that's not set as the default.
Sign In or Register to comment.