Validating dimension on sales order line in xmlport

kamranshehzad
Member Posts: 165
It throws exception when i try to validate dimension on sales invoice line using xmlport..
if i dont validate it, it works fine but den dimension doesnt it cos sales g/l entries...
any idea?
if i dont validate it, it works fine but den dimension doesnt it cos sales g/l entries...
any idea?
KS
0
Answers
-
error message is this..
--------------------------- Microsoft Dynamics NAV Classic --------------------------- The Sales Line does not exist. Identification fields and values: Document Type='Invoice',Document No.='620337',Line No.='20000' --------------------------- OK ---------------------------
KS0 -
This is one of the main issues when using Nav for integration.
Many tables, the way the code is written expects that the user is entering the data. So based on that fact if you are inserting the data through code, you have to take care of all the code that works fine for a user but doesn't work when doing it through code.
In your scenario. A user would insert the invoice line first, and then select a dimension.
On an XMLPort. the validate occurs first then the record is inserted.
What are you options? Don't trigger the code, and on insert add your own code and insert the record first and then fire the validation sequence.
The whole dimension implementation is horrible anyways.
They should have left Department and Project fields as is and have dimension as new functionality, nothing to do with Department/Project. No stinking synch code.
They could have added 8 more dimension fields to all the tables and call it 10 dimension, if any company needed more, they could do a modification.
They could have removed the department/project from the table and just keep it in dimension table.0 -
I am using this: when importing through XMLPort, I set the source table (the xml element of type table) as temporary and I am processing the data from this table in OnPostXMLPort where I am inserting the data into real tables in a way like when user enters them - it means:
<Fill primary key>
INSERT(True);
<validate other fields>
MODIFY(True);
Because in this way the dimensions will be filled in correctly...0 -
yes i added the funcationality as a trigger , being called after the data import... works fine.
thanks for your help.KS0 -
[Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks kine, your post helped me a great deal.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