file location in intercompany functionnality

TMAN10TMAN10 Member Posts: 11

Hello i have this problem when i want to import an xml file transaction

can you please help me to fix this problem?

Answers

  • Developer101Developer101 Member Posts: 552
    The error says the file does not exist?
    Are you clicking on Importing Transaction File button then selecting a file and then this error pops up or is there any customisation around this?
    Verify that file does exist.
    United Kingdom
  • TMAN10TMAN10 Member Posts: 11
    there is no customisation, when i select the xml file and click open the error message popup
  • Developer101Developer101 Member Posts: 552
    Seems that xml file might be corrupt. Please check the file as there is no reason for that error.
    United Kingdom
  • TMAN10TMAN10 Member Posts: 11
    Hello,
    i don't think so because when i set the path in the cu 435 line this way
    ClientFileName :=CompanyInfo."IC Inbox Details"+'\CEFA_2_1.xml' ;
    it works
  • Developer101Developer101 Member Posts: 552
    Strange. In the company info set the IC Inbox Type to the Database and remove folder in the IC Inbox Details and then try it perhaps?
    United Kingdom
  • TMAN10TMAN10 Member Posts: 11
    I have tried this but unfortunately the problem remain the same, i think that the problem came from cu 435

    CompanyInfo.GET;
    CompanyInfo.TESTFIELD("IC Partner Code");
    IF ClientFileName = '' THEN BEGIN
    IF CompanyInfo."IC Inbox Type" = CompanyInfo."IC Inbox Type"::"File Location" THEN
    // here it concatenate the path from C Inbox Details" and *.xml
    // it give a path like that c:\...\*.xml the file does not exist

    ClientFileName := FileMgt.CombinePath(CompanyInfo."IC Inbox Details",'*.xml');
    FileName := FileMgt.UploadFile(STRSUBSTNO(SelectFileMsg,TABLECAPTION),ClientFileName);
    END ELSE
    FileName := FileMgt.UploadFileToServer(ClientFileName);

    IF FileName = '' THEN
    ERROR(EnterFileNameErr);
  • Developer101Developer101 Member Posts: 552
    I see.
    Get rid of this line:
    ClientFileName := FileMgt.CombinePath(CompanyInfo."IC Inbox Details",'*.xml');

    What is NAV / BC version and CU?
    United Kingdom
  • TMAN10TMAN10 Member Posts: 11
    edited 2023-02-18
    Hello,
    The current version BC14 but how to get rid of this line?! how to get the file name properly?! is it a bug?!
  • Developer101Developer101 Member Posts: 552
    Correct code is this:

    IF (ClientFileName = '') AND FileMgt.CanRunDotNetOnClient THEN BEGIN
    IF CompanyInfo."IC Inbox Type" = CompanyInfo."IC Inbox Type"::"File Location" THEN
    InitialDirectory := DELCHR(CompanyInfo."IC Inbox Details",'>','\') + '\';
    ClientFileName :=
    FileMgt.OpenFileDialog(STRSUBSTNO(SelectFileMsg,TABLECAPTION),InitialDirectory,FileMgt.GetToFilterText('','.xml'));
    END;

    United Kingdom
  • TMAN10TMAN10 Member Posts: 11
    Great it works ! is it a bug or something?!
    Thank you
  • Developer101Developer101 Member Posts: 552
    great, thanks for confirming. It seems like it is bug.
    United Kingdom
Sign In or Register to comment.