XML Port - Modify data

subhadynamics
Member Posts: 109
Hi all,
I need too use the xmlport for import data to navision Tables. But my code is delete all the data and insert the data every time.This will be creating Log files also. Soi need to Modify the existing data.
Now my Code is given like this
recEmployeeTemp.DELETEALL;
IF ISCLEAR(WebServiceControl) THEN
CREATE(WebServiceControl);
WebServiceControl.getEmployeeDetails_New();
GetEmpFile.OPEN('c:\AllEmployeeDetails.txt');
GetEmpFile.CREATEINSTREAM(GetEmpStream);
XMLPORT.IMPORT(60000,GetEmpStream);
GetEmpFile.CLOSE;
anyones know Using the xmlport can modify the existing Table data ???
Please help me out??
Thanks in Advance
Subha
I need too use the xmlport for import data to navision Tables. But my code is delete all the data and insert the data every time.This will be creating Log files also. Soi need to Modify the existing data.
Now my Code is given like this
recEmployeeTemp.DELETEALL;
IF ISCLEAR(WebServiceControl) THEN
CREATE(WebServiceControl);
WebServiceControl.getEmployeeDetails_New();
GetEmpFile.OPEN('c:\AllEmployeeDetails.txt');
GetEmpFile.CREATEINSTREAM(GetEmpStream);
XMLPORT.IMPORT(60000,GetEmpStream);
GetEmpFile.CLOSE;
anyones know Using the xmlport can modify the existing Table data ???
Please help me out??
Thanks in Advance
Subha
0
Comments
-
Change the "temporary" property of the data source to Yes and then add code to change the records in the actual table.0
-
I have tried with Temporary property yes in the DataSource.
But How can i write the code for Modification of records in the Table.
Thanks
Subha0 -
You can use e.g. OnPostXML trigger to go through the temp table and transfer the modifications into your real table. Or you can use the OnBeforeInsertRecord of the table element to store the modifications on your own (the record will be automatically inserted into the temp table, but you can insert what you need into the real table in this trigger).0
-
I have the following query..
i hv created an xml port for which i hv created a codeunit..
in my xmlport i hv made Res. Ledger Entry/Chq Printing node as temporay.Nw the problem which m facin is when i run the codeunit the fields are not getting update in my table for d customer uniue no EPAYCUST011..this is the code which i hv written
IF "Res. Ledger Entry/Chq Printing".FINDSET THEN
REPEAT
MESSAGE('%1 1st',"Res. Ledger Entry/Chq Printing"."Customer Unique No");
gRecor.RESET;
gRecor.SETRANGE("Customer Unique No","Res. Ledger Entry/Chq Printing"."Customer Unique No");
IF gRecor.FINDFIRST THEN BEGIN
MESSAGE('%1',gRecor."Customer Unique No");
IF "Res. Ledger Entry/Chq Printing"."Customer Unique No"='EPAYCUST010' THEN BEGIN
gRecor."Corporate Code":="Res. Ledger Entry/Chq Printing"."Corporate Code";
gRecor."Payment Run date":="Res. Ledger Entry/Chq Printing"."Payment Run date";
gRecor."EPayment Status":="Res. Ledger Entry/Chq Printing"."EPayment Status";
gRecor."EPayment Status Reason":="Res. Ledger Entry/Chq Printing"."EPayment Status Reason";
gRecor."Transaction Value date":="Res. Ledger Entry/Chq Printing"."Transaction Value date";
gRecor."Bank Refernace No":="Res. Ledger Entry/Chq Printing"."Bank Refernace No";
gRecor."Corporate IFSC Code":="Res. Ledger Entry/Chq Printing"."Corporate IFSC Code";
gRecor."Bene Acc No":="Res. Ledger Entry/Chq Printing"."Bene Acc No";
gRecor."Reverse File Name":="Res. Ledger Entry/Chq Printing"."Reverse File Name";
gRecor.MODIFY;
END;
END;
UNTIL "Res. Ledger Entry/Chq Printing".NEXT=0;
plzzzz help0 -
Is all this code in your xmlport where your temporary table is?
Why not set this as a setrange or better still, don't write the records if they are not this value.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
can u plzz explain in detail..as of now with my tis above code the fields are getting inserted in the last line instead for the particular customer unique number EPAYCUST0110
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