web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

bank statement import MT940 Format in D365 Finance and operations

(0) ShareShare
ReportReport
Posted on by 406

Hello everyone, The MT940 Bank statements that we receive from the bank arrive with the account number like this :  :25:4052030478.  When we try to import this file we get an error "The bank statement was not imported because bank account ?? ?? ?? was not identified in the import file.".  If we manually change the .csv file so that the account number looks like this:  :25:/4052030478, it works fine. i already tried the data management method but its now removed by microsoft, i need a new way to be able to import bank statements without adding "/" manually. anyone can help?

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    Hi MounirDev,

    Here's an old thread with a similar problem to yours:

    community.dynamics.com/.../bank-statement-import-error-if-bankaccount-number-is-not-prefixed-with-routing-and

  • D365FO DEV Profile Picture
    406 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    Hello judy,

    I already tried this method but its not working anymore since its removed by microsoft

    microsoft statement: fix.lcs.dynamics.com/.../Details

    "Potential security vulnerability: XSLT transform running script DMFXsltTransform has a method transformFile() in which we are using XsltSettings with ScriptEnabled set to True. Because of this a hacker can put random script in the xml file and let the system run it."

    is another way that will let me import a bank statement without adding '/' manually on the swift MT940 format?

    regards,

    Mounir

  • huijij Profile Picture
    19,811 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    Please be patient and wait for the functional consultants to reply.

  • D365FO DEV Profile Picture
    406 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    please if you know a senior functional consultant or any person that can help me in my case, let him know. I have been troobleshooting and searching for a solution since 4 days.

    thank you

  • D365FO DEV Profile Picture
    406 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    i have found the class that is related to this batch regarding bank statement, its called ' bankstatementimportbatch', and there is a method called openresult() that after debugging is related to the bank account number. so can i create an extension on this class and add a condition to let the bankaccount number be imported from the swift MT940 format without adding the '/' manually? if yes please provide me with more informations.

    thanks,

  • Suggested answer
    Arcadi  Profile Picture
    788 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    MounirDev Are you using the latest MT940 ER Format? It seems like ER expects :25:SWIFT/IBAN or :25:IBAN, so there shouldn't be any problem with what your bank is sending you. If you are not using ER try it with the "MT940 Format" from Microsoft repositories.

  • D365FO DEV Profile Picture
    406 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    I'm using the latest ABR MT 940 formatt in the advanced bank and reconciliation in the ER. also i tried using the MT940 Format but it didnt work. so when i use ABR MT940 FORMAT, lets say the bank account number is :25:95929901221 if i try to import this statement, it gives an error saying 'The bank statement ???? was not imported because bank account ???? was not identified in the import file'. But if i add manually on the swift format a '/' so it will be like that :25:/95929901221, it will import successfully. i just need a way to be able to import statements without adding '/' manually on each record since i got alot of records. please i have been suffering with this issue i need your help.

  • Suggested answer
    Arcadi  Profile Picture
    788 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    Still can't see any problem with that format, but anyways if you want to add the slash, derive your ER format, and in the model mapping change the formula for format>statementfile>statement to 

    SPLIT(
        REPLACE(
            REPLACE(format.StatementFile.FileContent,":25:",":25:/",true)
            , "(\r\n|\r|\n):20:", "?:20:", true)
            , "?:20:")

  • D365FO DEV Profile Picture
    406 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    can you please tell me step by step how i can done this, because im not a functional guy. like if u can tell me how i derive my ER format, how i find the model mapping, and how i change the formula in the model mapping in order to paste the formula u shared.

    waiting for ur reply,

    thanks

  • D365FO DEV Profile Picture
    406 on at
    RE: bank statement import MT940 Format in D365 Finance and operations

    i got these errors after using this formula.(note that i am using development environment and there is only statementfile.sequence bcz i cannot edit on the UAT its saying 'cannot edit in read only editor. and the errors i got are:

    Incorrect reference 'format/StatementFile/FileContent'

    Function arguments are of incorrect types in 'REPLACE'

    Function arguments are of incorrect types in 'REPLACE'

    No overload for function SPLIT matches the input parameters

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,004

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 865 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 582 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans