Budget Import Error

bt2003bt2003 Member Posts: 9
Hi
When selecting 'Sales & Marketing>Analysis & Reporting>Budgets'
and then from the Budget form select 'Functions>Import from Excel'

The routine displays messages "Reading Excel worksheet..." followed by "Analyzing data..." and then the error message
"User User ID 'FRED.BLOGS' does not exist."

I am using UK Dynamics NAV 5.0, with SQL Server, and Windows Authentication.
The user is setup in Security>Windows Logins (obviously, as he is able to login successfully and run this routine before getting this error).
Other users when trying to run this routine also get to the same error, but with their own login name in the error message.

Any help will be greatly appreciated.

Answers

  • ara3nara3n Member Posts: 9,256
    How did you create the excel file?

    I usually suggest customer to export the budget first. Then populate the excel file, then import it.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bt2003bt2003 Member Posts: 9
    Hi
    Thanks for replying.

    The file is generated by selecting 'Functions>Export to Excel' from the budget form.
    Some values are entered against some of the lines, and file saved.
    Then after selecting 'Functions>Import from Excel' and browsing to the file, unfortunately get the above error.

    It seems to be in report 7131 Import Item Budget from Excel, the underlined line below

    ItemBudgetBuf - OnAfterGetRecord()RecNo := RecNo + 1;
    .
    .
    ItemBudgetEntry.VALIDATE("User ID",USERID);
    ItemBudgetEntry.INSERT(TRUE);

    But this report (version NAVW14.00.03) is unchanged from the previous version of NAV, and so is even more puzzling as to why its giving this issue.

    Thanks (in anticipation of) for more of your thoughts.
  • ara3nara3n Member Posts: 9,256
    Design the table "Item Budget Entry" and make sure the field "User id" property "TestTableRelation" is set to NO.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jannestigjannestig Member Posts: 1,000
    IF you do the same thing thing from purhase and payables budget do you get the same error ?
  • bt2003bt2003 Member Posts: 9
    Hi jannestig, if I do the same thing from purchase and payables budget I still get the same error.

    ara3n, your suggestion of, Design the table "Item Budget Entry" and make sure the field "User id" property "TestTableRelation" is set to NO, - this property is already set to No, - however the ValidateTableRelation is <Yes>, and this could be set to No and the problem will go away.
    Alternatively in R7131 could change the line
    ItemBudgetEntry.VALIDATE("User ID",USERID);
    to
    ItemBudgetEntry."User ID" := USERID;
    and the problem will go away.

    Leaving the Item Budget Entry table properties as they are ie TestTableRelation is NO, and ValidateTableRelation is <Yes> - why is it then, that I can go into the budget form and enter values happily without any error and the import fails?
  • ara3nara3n Member Posts: 9,256
    because when you lookup it runs LoginMgt.LookupUserID("User ID"); which displays windows users as well as db users.

    Either solution will work.
    if you decide with changing ValidateTableRelation to No then add code to onvalidate the following code.

    LoginMgt.ValidateUserID("User ID");


    I've looked at 2009 sp1, and they have removed the table TableRelation property altogether.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bt2003bt2003 Member Posts: 9
    Thanks for the reply ara3n.

    I have decided to make the change to the import routine and leave the table as is.
    It is still a little surprising that no one has raised this issue on this forum before, considering it is such a commonly used routine.
  • ara3nara3n Member Posts: 9,256
    not a lot of companies budget items.
    Also add a note to the report that the modification doesn't need to be upgraded. Since this has been fixed in 2009 sp1
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.