Hi All,
My problem is follows:
1: I need to create the XML file for Purchase Order in Navision and than to import from Navision to some location say C drive.
2: Purchase order should include Purchase Header and Purchase Line.
Queries:
a) Can I use XML port to achive this?If yes then is there any reference about how to use XML port?
b) If point a is acievable then how to run the XML port in Navision.
Is there any other solution inspite of XML port?
Thanks in advance!
Regards,
Abhishek
0
Comments
XMLPorts are used inside C/CAL code, you can't run them directly from the object designer. For some examples take a look at the commerce gateway XML codeunits.
You can also write code to open and process XML documents, using the XMLDOM automation server. For samples take a look at the same codeunits in older versions that didn't yet have XMLPorts.
RIS Plus, LLC
Thanks for help in advance!
Regards,
Abhishek
RIS Plus, LLC
Thanks
Regards,
Abhishek
well I have already created XMLport for purchase header and line but dont know how to call this xml port for the sales invoice xml file
Application Designers Guide
PART 8 XMLPorts
Chapter 21 XMLPorts
XMLport Fundamentals Designing XMLports XMLport Examples Validating Data XMLports and Business Notification
Also, available in the download section
Xml Export 1.3i
viewtopic.php?f=7&t=1775
XML Import Sample v1.0i
viewtopic.php?f=7&t=2266
http://www.BiloBeauty.com
http://www.autismspeaks.org
Steps to create the xml port:
1:First create the file object
2:Create the instream object
3:Call the open function with the path and file name of the xml file which you had created.
4:Call the Import function for xmlport object with the parameter as follows
a)XMLPORT ID
b)Instream variable
Example:
Filexml.OPEN(filepath\filename);
Filexml.CREATEINSTREAM(instreamobject);
XMLPORT.IMPORT(50001,instream); //for running th xml port without setting the filter for the record
Regards,
Abhishek Pareek
1) Declare the record variable in Globals
2) Go to property for that variable and make temporary =yes
Regards,
Abhishek Pareek
ImportFile.OPEN('C:\Temp\Import.xml');
ImportFile.CREATEINSTREAM(INSTREAM);
XMLPORT.IMPORT;
ImportFile.CLOSE;
can i add these two lines
rec_PurchHeader.SETRANGE("No.", "No.");
XMLPORT.SETTABLEVIEW(rec_PurchHeader);
what about the INSERT or TRANSERFIELDS functions ? how and where i can use them ? :-k
I am desperate student ](*,) does anybody have an idea how to continue with this code to finish import from xml file?
I can attach my xml port for import if it helps
Thanks to anybody who can help
XMLPORT.IMPORT;
Correted one:
XMLPORT.IMPORT(XMLPORTNUMBER,INSTREAM);
XMLPOARTNAUMBER ->The object ID of the XMLPORT which needs to be run for importing the XML records.
Regards,
Abhishek Pareek
but i need to add some more lines i think since tha data must be imported somewhere.. e.g. temporary tables or some variables of a type RECORD..
i am really desperate
ImportFile.OPEN('C:\Temp\Import.xml');
ImportFile.CREATEINSTREAM(INSTREAM);
XMLPORT.IMPORT(1,INSTREAM);
ImportFile.CLOSE;
do you think this will work ??