Dynamics User Group
Since 1995 - The Microsoft Dynamics Online User Community

Error re: autosplitkey when entering a new comment line between two existing ones

rated by 0 users
This post has 14 Replies | 0 Followers

Not Ranked
Posts 6
Points 270
Member since 08-07-2000
Gemma Posted: 08-07-2000 11:54
NF 2.01B
S&R > Customer > Comment Sheet
Entering a new comment line between two existing ones generates an error message re: autosplit key.
Dropping the Line No. field on the Comment Sheet form showed the first two line no's as 1 and 2, since a line no has to be an integer , the system doesnt allow a new line to be entered between these two.
Tried renaming zup file, autosplitkey is set to yes !! ?????
  • | Post Points: 170
Top 50 Contributor
Male
Posts 425
Points 3,380
Member since 09-10-1999
Gemma

The line No.'s should be 10000 and 20000 have you had work done with the comments tables?

Mr David Cox

MindSource (UK) Limited
Navision Solutions Partner

Email: david@mindsource.co.uk
Web: www.mindsource.co.uk

mailto: David.Cox@adeptris.com http://www.adeptris.com Find Free Development Tutorials to Download
  • | Post Points: 5
Not Ranked
Posts 6
Points 270
Member since 08-07-2000
Dave,

No work has been done on the comments table.
The problem occurs intermittently and sometimes corrects itself?????
  • | Post Points: 5
Top 50 Contributor
Male
Posts 425
Points 3,380
Member since 09-10-1999
If the two questions you have posted relate to the same Database and you have applied all Service Packs, the Only path I can think of is to Backup and Restore the database to a different PC try to reproduce the errors, if unable to reproduce them, then it could be the binaries Check the Hard Disk if ok then reinstall Navision and reapply service packs!

any other Idea's anyone?

Mr David Cox

MindSource (UK) Limited
Navision Solutions Partner

Email: david@mindsource.co.uk
Web: www.mindsource.co.uk

mailto: David.Cox@adeptris.com http://www.adeptris.com Find Free Development Tutorials to Download
  • | Post Points: 5
Not Ranked
Male
Posts 3
Points 15
Member since 03-24-2000
This CAN be reproduced so I think it is a bug in Navison (2.00a US).

Try this to reproduce.

Add a line to the comment table for a customer and set "Code" field to 'ITEMNOTE'. Next add another comment with "Code" field blank. (Note the table resorting itself). Next add another comment with "Code" field blank.

Navision errors with a comment line already exists error. It is because the primary key is "Table Name" ,"No.", Code, "Line No.".

Paul Christensen
Senior Appl./Network Analyst
Moss Motrs, Ltd.
800.235.6954 x3210
  • | Post Points: 5
Top 50 Contributor
Male
Posts 425
Points 3,380
Member since 09-10-1999
Paul

Gemma has the problem at Form level not at the Table level
the Code field is not on the form, as you cannot have a blank customer, you will not reproduce your observation with normal proccesing of Data.

The Code field on the table is for Ship-to Address
IE. Customer,CLINTON,DC,10000

Overview of the AutoSplitKey:
The AutoSplitKey property is not availiable at Table level only at Form Level that is why you was able to create your error.

when the AutoSplitKey is selected on the form properties Navision will autofill the "Line No." field starting at 10000 and the incrementing by 10000 so the second line would be 20000.
if you enter a line between, the AutoSplitKey function divides the two "Line No." fields to create a 15000 "Line No."

Primary Key
Code "Line No."
1000 10000
1000 15000 < Inserted Record
1000 20000

Gemma's problem is that Navision created lines with "Line No."'s 1 and 2 so the AutoSplitKey could not Insert a record between!



Mr David Cox

MindSource (UK) Limited
Navision Solutions Partner

Email: david@mindsource.co.uk
Web: www.mindsource.co.uk



Edited by - David Cox on 8/11/00 8:33:20 AM
mailto: David.Cox@adeptris.com http://www.adeptris.com Find Free Development Tutorials to Download
  • | Post Points: 5
> Gemma's problem is that Navision created lines with
> "Line No."'s 1 and 2 so the AutoSplitKey could not
> Insert a record between!

Are you certain that these records were not generated by a data conversion or some means other than data entry via the Navision form?

-jp


  • | Post Points: 5
Not Ranked
Posts 6
Points 270
Member since 08-07-2000
JP,

These customer comments were created purely by data entry.

Gemma
  • | Post Points: 5
Top 500 Contributor
Male
Posts 52
Points 260
Member since 08-14-2000
Perhaps the field "Line no." has been on the form at one time, and the user has entered the line no. ?
  • | Post Points: 5
Not Ranked
Posts 1
Points 5
Member since 08-17-2000
I am the user concerned and can be certain that no manual entering of field number is possible, (for a user making general data entry).
  • | Post Points: 5
Not Ranked
Male
Posts 3
Points 15
Member since 08-25-2000
Remember also that if you view the data through a form with AutoSplitKey set to yes, then you can cut and paste the lines of data back into the same rows. Navision will automatically increment each line/row by 10000. Make sure to select the rows by using the grey bar to the left of the rows for this to work.

As far as why the records were numbered 1 and 2, you will need to determine how the records were entered, and if they had been renumbered. If they were inserted by a code rather than by a user, investigate the section of code that determines the number for the record to be inserted.
  • | Post Points: 5
Top 150 Contributor
Male
Posts 131
Points 665
Member since 08-28-2000
When you insert a new line in comments with F3 key, navision inserts a new line. If you are with line 10000, navision inserts line 5000, 2500, 1250, 625, 312, 156, ... and continuing to line 1. Therefore, Navision makes an error, because you are between line 2 and 1.
You can go back to the beginning cutting and pasting all comment lines. Navision renumbers lines with 10000, 20000 , ..., and you can continue working normally.
  • | Post Points: 5
Not Ranked
Male
Posts 7
Points 105
Member since 08-24-2000
Can one instruct NF to renumber - apart from copy/paste?

Edited by - HenrikKraglund on 8/29/00 1:12:44 AM
  • | Post Points: 5
Top 150 Contributor
Male
Posts 131
Points 665
Member since 08-28-2000
You are using primary key.
  • | Post Points: 5
Not Ranked
Posts 1
Points 5
Member since 10-20-2000
>>reply to HenrikKraglund
>>Can one instruct NF to renumber - apart from copy/paste?

No, not in standard NF

You need to get your NSC to make a small function to renumber/copy comments.

Or if you are a super user with access to the object designer, select and run table 97 "Comment Line" and locate the comment line you want to renumber. Change "Line No." to the desired number and select the following line. You will be prompted with "Do you want to rename the record" choose yes and the renumbering is complete.

  • | Post Points: 5
Page 1 of 1 (15 items) | RSS


Copyright Dynamics User Group, 1995-2009, all rights reserved. The Dynamics User Group is not affiliated with Microsoft Corporation.