Hi,
I have created my custom XMLport for import the CSV file, In XMLPort, when I import data from external csv file it will import record. but when error occurs in record it will not import any data. I want to skip those record and continue importing. anyone have a soution for this?
Thank you.
Thank you sir for your reply,
Can you provide me the screenshot of your steps or where can i find "Properties Window" in AL object Designer(designer).
Thank you sir for your reply,
I have created XMLPort of tableelement "Item", & Added action of XMLPort on "Item" Page but
It's not working, I have also attched the screenshot of my code. Can you please check it?
Yes, you can handle errors in XMLPort during the import process by using Error Handling Properties.
To skip the record with errors and continue importing the rest of the data, you can set the ErrorHandling property to "Skip". This will allow the XMLPort to continue importing data even if it encounters errors in some records.
Here are the steps to set the ErrorHandling property to "Skip":
1. Open the XMLPort in the designer.
2. In the Properties window, locate the ErrorHandling property and set it to "Skip".
3. Save and compile the XMLPort.
4. Run the XMLPort to import the CSV file. When an error occurs in a record, the XMLPort will skip that record and continue importing the rest of the data.
Note that when using the "Skip" option, the XMLPort will not report any errors for the skipped records. If you want to track the errors and their corresponding records, you can set the ErrorHandling property to "Stop". This will stop the import process when an error occurs and display an error message with the details of the record causing the error.
Hi, If you want to skip a certain line, you can try the following method.
Xmlport.Skip() Method - Business Central | Microsoft Learn
Hope this helps.
Thanks.
ZHU
Hi
You should run the xml on a dataitem of type integer:
you have to create a function of type [TRY] where you run the checks in which you enter any errors, that way the xml port will continue to run to the end
check my answer if it helped you, thanks
DAniele
Thank you for the prompt reply, but
I have already imported Record From external CSV or XML file,
But when error occurs in any one field Record (just like, code datatype length is code[20] and we gave length more than 20 in external file Records),
It will gave the error and not import any record of external file, not only those Record whole records are not imported, i want to skip only one record and continue importing other records.
Thank you Mohana, But I am Newbie in this area, could you please sent me the any reference link or blog if you have, it would be really helpful to me.
Thank you once again for the prompt reply.
Create a buffer table and import the records to that table first and then process the data to main tables.
You can add a validation function before moving the records to main table and skip them if there is any error.
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,104 Most Valuable Professional
nmaenpaa 101,156