Incoming http Request Modifying NAV Table [NAV 2009 R2]

HCAndersen
Member Posts: 2
Hi there,
I am designing a code unit and a xmlport in order to modify NAV contact table record from an external .net http-request. (Avoiding physical xml-files in the process is preferred). However the method below is only good for inserting new records into the NAV table. Modifying is also required.
A XMLport has the following layout based on the contact table:

A code unit has the xmlport as input parameter and the following statement only:

A simplified request from a test client has the following xml-design (based on the published NAV codeunit's wsdl):

But NAV returns error if the record already exist and the record has to be modified instead. Any ideas how tweak the codeunit to modify existing records using the method described above?
Thanks in advance!
I am designing a code unit and a xmlport in order to modify NAV contact table record from an external .net http-request. (Avoiding physical xml-files in the process is preferred). However the method below is only good for inserting new records into the NAV table. Modifying is also required.
A XMLport has the following layout based on the contact table:

A code unit has the xmlport as input parameter and the following statement only:

A simplified request from a test client has the following xml-design (based on the published NAV codeunit's wsdl):
<CRMImporttest xmlns="urn:microsoft-dynamics-schemas/codeunit/WSUpdateNAVContact"> <cRMImportxml> <Contact xmlns="urn:microsoft-dynamics-nav/xmlports/x50009"> <No>KT1234569</No> <Name>hello</Name> </Contact> </cRMImportxml> <CRMImporttest />When the test client is executed the record is inserted perfectly into the NAV table.

But NAV returns error if the record already exist and the record has to be modified instead. Any ideas how tweak the codeunit to modify existing records using the method described above?
Thanks in advance!
0
Comments
-
You could use a temp table in your xml-port.
Then insert the contact using a global record and ofcourse if the record allready exists you can modify it.BriteBlue Solutions BV | briteblue.nl2 -
You should be able to change this behaviour using the "AutoSave", "AutoReplace" and "AutoUpdate" properties of the "Contact" element.0
-
Thanks ! I'll attempt to use the temporary table.0
-
You should be able to change this behaviour using the "AutoSave", "AutoReplace" and "AutoUpdate" properties of the "Contact" element.
The functions AutoSave, AutoReplace and AutoUpdate are not available in NAV 2009 R2.BriteBlue Solutions BV | briteblue.nl1 -
Temp table is the solution0
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