How to Export hardcode value by XMLPORT

Hello All,

What I want to do is, when I open Item Journal

will export a csv file by using xmlport, which will include following fields

header title and few field from table line.

I am able to export header title.

But as we do not have any entry in table(in this case table 83) so I am not able to export even hardcode value from xmlport. I want to export

Template Name = whatever selected

Batch Name = whatever selected

Line No = 10000

Entry Type = Negative Adjmt

how can I do that?

Thanks in advance.

Development…

SImple solution is to do a count of lines within the filter. If the number is zero then initialize a new line and insert it before you start exporting the file.In Put the code in the OnBefore-trigger - should not take you more than 3-5 mins to do.

Thanks Palle for reply.

Sorry my mistake, I think I did not explain properly. You did not get my requirement.

There never ever will be data in item journal when I export file.

When I will export file, xmlport will create header title and batch name and template name(please see attached csv screenshot).

Then I will edit this exported file, will put Item No, Location and Quantity. (will put n no. of lines in csv file) and then i will import it .

I will give two buttons on ribbon of Item Jrnl page, one for export and one for import.

Please see attached csv file screenshot. I will insert data in this file(only in Item No, LOC and QTY) and then will import to create item journal.

I did same thing, but in that case Purch Ord No. was available.

Thanks.

Well, No records exists in table 83 so there is NOTHING you can export! So you HAVEto create a line, just a blank one. Because when you do that it will get initialized with

A Template Name,A Batch Name and Line No as 10000.