Creating dataport without quantity

Vesna
Member Posts: 24
HEy again,
Now I am trying to create another dataport where in Purchase Line only Item, No. Description and Amount have to be specified.
I assign variable for Line Amount only and try to import the file.
When I do it I see the message :
"Quantity must not be 0 in Purchase Line Document Type='Invoice', Document No.........."
I don't have quantity column in my file, only amount.
Any ideas are highly welcome.
Thanks
Now I am trying to create another dataport where in Purchase Line only Item, No. Description and Amount have to be specified.
I assign variable for Line Amount only and try to import the file.
When I do it I see the message :
"Quantity must not be 0 in Purchase Line Document Type='Invoice', Document No.........."
I don't have quantity column in my file, only amount.
Any ideas are highly welcome.
Thanks
0
Comments
-
how can you have an amount if you have no qty?
are you trying to import G/L lines.
If you need to create an invoice without using Qty then you would use the Purchase Journal not a PO.
you can always add
Onafterimportrecord() some code like
Quantity := 1;
if your file doesn't contain it.0 -
Thank you so much Savatage,
My first experience with Purchase Line dataport was so successful that I thought I can do anything there.0 -
You CAN do almost anything in code, but you must realize that there is an important distinction between what is technically possible, and what is possible from a business logic standpoint.
You would not be able to manually enter such a line, so you should not develop anything that does it for you. A good starting point would be to open the Purchase Order and enter a line manually, while the debugger is on. Then you keep track of what happens behind the scenes, to determine which fields you need to validate and such. This is the basis of your dataport.
Like Harry said, you have to have a quantity to have an amount.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