Get the file path from Sales and Recievable setup field for Dataport export.

Hi all,

I have exported customers as a CSV file with the help of Dataport. Here I have to give the path for the file to export.

But, I want to get the file path from a 'Sales and Receivables Setup' table's field (I have created one field called 'file path' in 'Sales and Receivable setup' table).

So how to code to get the file path from that field to export?

Please suggest me some steps.

Thanks in Advance,
Jacob A.

Answers

  • TallyHoTallyHo Member Posts: 417
    on pre dataport or on init dataport add:
    salessetup.get;
    currdataport.filename := salessetup."The File Name";
  • Jacob1227Jacob1227 Member Posts: 128
    Hi Tally,

    Thank you. I have done it. Can you please suggest me some code to do the same process using code unit(Calling a Dataport from Codeunit).

    Thanks in advance,
    Jacob A.
  • TallyHoTallyHo Member Posts: 417
    Sure:
    salessetup.get;
    exportsegmentcontact.FILENAME := salessetup."The File Name";
    exportsegmentcontact.runmodal;
Sign In or Register to comment.