Options

Service Quote Make Order Error

derekj22derekj22 Member Posts: 16
I have a part reserved on a Service Quote. When I go to make the service quote an order I get the following error: "The primary key in the reservation entry table can contain only one field, and its type must be integer".

I have looked into the action "Make Order" Action 33 on the Service Quote (Page 5964).

I have followed the code path to Code Unit 5922 then to Code Unit 5923 which calls a function ServLine.VALIDATE("Reserved Qty. (Base)",0);

This runs through each item that is on the service item worksheet. Once it finds a item that has a reservation the Validate piece stops and the next line does not run and the error is thrown.

But I haven't been able to trace where that is occurring or what is going wrong.

I could use some help being pointed in the right direction, or enlightenment on what I am missing.

Thank you,
dj

Best Answers

Answers

  • Options
    krikikriki Member, Moderator Posts: 9,096
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    KishormKishorm Member Posts: 921
    Hi Derek,

    I've not got NAV open right now so I can't check but it looks like the error is occurring on that line because the "Reserved Qty. (Base)" is a flowfield so when you validate a value in there NAV tries to create a new record in the related table. In this situation the table in the flow field expression (Reservation Entry in this case) must have a single integer field as the key.

    You might think this is a strange thing but this is how budgets work in NAV - the budget amount is a flowfield, you adjust the value on the form/page and behind the scenes NAV creates additional records in the budget entry table.

    Regards
    Kishor
  • Options
    derekj22derekj22 Member Posts: 16
    @Kishorm

    Thank you for your reply! Upon further investigation, it looks as though when I make a reservation from the Service Quote (Service Item Worksheet) it sets the Source Type to Database::"Service Line" (Which I would expect), Source SubType to DocumentType (which I would expect) and the source id to Document No. [Page: 498, Line Number: 427, Function: SetServiceLine] (this is done with out first scrubbing the "SQ" from SQ00000 when the doc type is quote.)

    My question is, should I change the way nav enters quotes into the reservation entries table?

    Thank you,

    dj
  • Options
    derekj22derekj22 Member Posts: 16
    @Kishorm

    My previous assumption was incorrect. Upon pressing Make Order, I still get the error: "The primary key in the reservation entry table can contain only one field, and its type must be integer"

    I modified the Quote numbering sequence to remove the SQ prefix, and the clicked make order. This did not change the way the error was represented.

    After looking at the table "Reservation Entry" 337, the primary keys look to be "Entry No." and "Positive" (I looked in SQL Server Management Studio).

    At this point I am at a loss, I can test what is causing the issue by removing the validation in CodeUnit 5923, Function OnRun, Line Number 18, ServLine.VALIDATE("Reserved Qty. (Base)",0); However, this is not a fix and is only a hack.

    My hope is to understand the root cause and fix the primary issue.

    Thank you,
    dj
  • Options
    derekj22derekj22 Member Posts: 16
    @Kishorm

    Thank you for your replies, that makes a lot of sense. When I comment out the validate section, I am able to move through the process of converting to an order.

    You are correct, there have been changes to native nav to allow for reservations through quotes, the client's process dictates they reserve and even order parts during the quote stage to maintain their SLAs with their clients.

    My concern with the removing of the validation is the potential for other errors that could emerge because of this change.

    If you were in my situation, would there be any specific areas you see for concern?

    Thank you,

    dj
  • Options
    KishormKishorm Member Posts: 921
    No, I have no concerns removing that statement. Like I said just test to make sure the reservations get transferred across to the order correctly.
  • Options
    derekj22derekj22 Member Posts: 16
    @Kishorm

    Thank you! I really appreciate your insight!
Sign In or Register to comment.