Problem Importing Values into Purchase Line Date Fields

ginab
Member Posts: 3
I wrote a little app for a customer that imports Purchase Orders into Navision from another system they have. Everything seems to be working ok except the Planned Receipt Date, Expected Receipt Date, and Order Date fields in the Purchase Line table are throwing an error.
After importing the PO, the user opens Navision, the user navigates the record, and then the user attempts to edit the Planned Receipt Date, Expected Receipt Date, or the Order field and receives this error:
The date formula ‘+0’ should include a time unit.
Time Units can be: D, WD, W, M,Q,or Y.
C, meaning current time unit based on date, can be specified as a prefix to the time unit.
I am not sure what is going on here because when I import values for these fields they are dates. Sql will not let you enter anything but a date for a date/time field. If I view record in enterprise manager everything is cool. But when viewed from Navision is not so cool.
I am obviously missing something. But what? Is this formula looking for a value in another field maybe? If anyone can lend a clue it would be appreciated. Thanks for your time!
After importing the PO, the user opens Navision, the user navigates the record, and then the user attempts to edit the Planned Receipt Date, Expected Receipt Date, or the Order field and receives this error:
The date formula ‘+0’ should include a time unit.
Time Units can be: D, WD, W, M,Q,or Y.
C, meaning current time unit based on date, can be specified as a prefix to the time unit.
I am not sure what is going on here because when I import values for these fields they are dates. Sql will not let you enter anything but a date for a date/time field. If I view record in enterprise manager everything is cool. But when viewed from Navision is not so cool.
I am obviously missing something. But what? Is this formula looking for a value in another field maybe? If anyone can lend a clue it would be appreciated. Thanks for your time!
0
Comments
-
Hi ginab,
I would suspect that you set the Lead Time Calculation or Safety Lead Timefield to '0' - this is a dateformula type field and should be initialized to blank or 0D.
The check the defaults post a manual PO and Zoom (F8 ) on the record to see the defaults from your setup.0 -
I assume you import your purchase order data at SQL level...
I agree with Dave concerning the "Lead Time Calculation" and "Safety Lead Time" fields. If you will look at the OnValidate triggers of "Order Date", "Planned Receipt Date", "Expected Receipt Date" in table 39 you will see that there are some references to the above mentioned dateformula fields, and if they contain wrong values the system gives the errors mentioned whrn trying to modify the date fields.
I would suggest though to import your PO at NAV level instead through dataport or something, this way you can control the data inserted.//Bogdan0 -
It was the Safety Lead Time field. I was setting it to 0 instead of blank. Thanks so much!0
-
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions