Hi all,
i'am trying to start coding my own XMLport and i need to know how to check the value before the insert in the table for exemple :
the table contain item 1 and item 2 with price P1 and P2 I use an XMLport to upgrade prices but my file containe item 1 and new price NP1 and item 3 and new price NP3 so my database doesn't have item3 i want the XMLport to update only Item1 and ignor the item 3
how can i do it ?
*This post is locked for comments
i add this code
IF Item.FIND('-') THEN BEGIN
currXMLport.SKIP; END
in the OnBeforeInsertRecord() trigger and set the AutoSave to Yes it worked for me
RockWith NAV do you have some samples of code that insert the records on table ?
yes AutoUpdate is to yes but doesn't update
also in the dynamic nav walkthrough (msdn.microsoft.com/.../dd338609(v=nav.90).aspxx) they say "If AutoSave is set to No, then an imported record is not automatically written to the appropriate table. To insert or modify records manually, add code to the OnBeforeInsertRecord Trigger and the OnBeforeModifyRecord Trigger." i need just example for insert records from xmlport manyally.
Hey,
Import::OnBeforeInsertRecord'
Writing code on this trigger will too solve your case.
also set AutoUpdate to Yes.
Hi,
could you try on the 'Import::OnBeforeInsertRecord' trigger putting something like this:
If NOT Item.GET(ItemNo) THEN CurrXMLPort.SKIP;
Robertas
i just try this and now it doesn't update the prices
it will not import if data is not not available in table. no need to write code to check.
this will stop the xmlport from importing the data automatically and i need a code to check if the value exist and import it.
check the properties of Item dataitem in xmlport and set AutoSave to No.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156