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):
<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!
Comments
Then insert the contact using a global record and ofcourse if the record allready exists you can modify it.
The functions AutoSave, AutoReplace and AutoUpdate are not available in NAV 2009 R2.