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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Credit card statement import error.

(0) ShareShare
ReportReport
Posted on by

Hi,

I am importing Credit card statement for which have below sample data in CSV.  

Processdate,AccountNumber,Description,CurrencyCode,Debit,Credit,Balance
20/APR/15,1234567890111213, AK AU7958193920525 BOWEN,USD,685.71,,

20/APR/15,5550051000842500, PK AU7958193909647 BOWEN,USD,848.7,,

I have created SharedXSD and TrvPBSMainDataXSD for credit card import service TrvPBSMainDataService.

when i import the statement i am getting below error.

Input file does not conform to messageset schema.

Transformation failed. Select another format or check the format definition before importing the file again.

AifImportResults object not initialised.

 

What wrong i am doing here? 

 

I referred below link to generate DLL file from Visual studio 2013 and i registered it for transformation in inbound port. i could successfully activate inbound port. but import throws above error.

 

https://shashidotnet.wordpress.com/2011/12/12/dynamics-ax-2012-aif-import-csv-file-part-3-import-csv-file-using-aif/

 

*This post is locked for comments

I have the same question (0)
  • Shashi s Profile Picture
    1,203 on at

    HI Vdy,

    Try to do the import without the xsd files. i.e. create the XML files and supply it to the folder which should just be out of the box scenario. But chances are the the XML message being constructed isint being generated properly. There will be some fields which may be mandatory

    You could also check the DLL seperately by generating the XML file and checking it against the schema, like this link: http://www.c-sharpcorner.com/UploadFile/susanabraham/ValidatingInputXmlDataFiles11292005000113AM/ValidatingInputXmlDataFiles.aspx

  • Community Member Profile Picture
    on at

    yesterday i generated XML from the visual studio solution which i build for transformation. I put in the the folder and ran AIF job manually with the 4 tasks (aif gateway receive, inbound processing, outbound processing, aif gateway send). It successfully inserted data.

    It's weird that the same XML goes to  AX from inbound port but says it does not comform to the schema.

  • Shashi s Profile Picture
    1,203 on at

    Have you checked the Transform settings on the AIF service?

    Also when you say it works now, did you make any changes to the AIF settings? Maybe, it didn't apply any transformations, and says the CSV file does not match the schema (which it shouldn't)

  • Community Member Profile Picture
    on at

    Hi Shashi,

    When i say it works now, it means, it is working only when i provide xml file as input to file adapter inbound port.

    It still throws above error when exactly following your blog. i am not sure what's wrong with transformation. have you ever faced such error?

    Also whenever i am closing Manage transform screen after loading DLL file, it throws error message saying 'access denied to c:\users\...\xyz.tmp file'. i don't know what's the matter. Is it trying to convert .DLL file into .tmp file and copy to Temp folder ?

  • Shashi s Profile Picture
    1,203 on at

    Hi Vdy, The second screen sounds interesting. I am not sure of the inner workings on how it moves the dll. But chances are this dll will run on the AOS under the CIL all the time. So it maybe trying to store it in a temporary folder before it moves it maybe.

    I havent got any error like you have, so what i could suggest is to put some sort of code in the DLL (like creating a text file and putting some data in there), just for debugging to know if its even going inside the dll to start with.

    If that works, then i would write the output to a separate file (make sure the AOS has full permissions) and then check that file if it has it.

    The downfall of adding these transformation DLL's is that it has to be rock solid. Even a CSV file with only a few columns can cause the DLL to fail.

  • Community Member Profile Picture
    on at

    Hi Shashi,

    somehow i made it work. But everytime cardnumber goes as blank in table. That's because in insert() method of TRVPBSMainData table  ,  modifiedfield() method is getting called for CardNumber which is making it blank in that.

    Is this expected behavior? If Yes, then CardNumber would always show blank in TRVPBSMainData table after import. Why is such implementation?

  • Suggested answer
    Shashi s Profile Picture
    1,203 on at

    Excellent news! Although "somehow" is not the solution is it? :)

    Regarding credit card numbers going blank, has to do with compliance. How would you like me to store your credit card number in plain text? :)

    Have a look at this....(Its got to do with PCI compliance, although not sure if it is an international body or is specific to every country)

    security.stackexchange.com/.../how-to-store-credit-card-information-for-repeated-transactions-and-still-be-pci

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Shashi,

    I was settings parameters of the TrvPBSMainData not as per the order of the fields in the Schema hence it was failing. I just reordered and it worked. My mistake.

    I believe Expense report on Enterprise Portal allows expense transaction to be selected from TrvPBSMainData where we just imported the statement.

    I am just wondering how user will be able to select the transaction from enterprise portal to add it to Expense report if he cannot see the credit card number against the transaction in case he has multiple corporate credit card (hypothetical scenario). We haven't setup EP yet for development instance. Please let me know your views.

  • Community Member Profile Picture
    on at

    hi Shashi,

    I got weird problem now.  

    person is trying to import credit card statement.  He is  ax user in a default company 'A' as per Userinfo table.

    Here he is importing credit card statement in company 'B' as all employees mentioned in statement are of Company B.

    As inbound port is a service and it doesn't have any information of company in xml message it gets, it tries to import data into the default company of the person who is importing the statement. This would I guess create issue when employees tries to prepare expense report from EP as they wouldn't be able to see their transactions as that is imported in different company than they are in currently.

    did you face this?

    for more details, please see the method in class AifInboundProcessingService\runAsUserInPartition

  • Community Member Profile Picture
    on at

    Hi,

    I am also facing the same issue.The transformed xml data is created into the user default company though I define the company in header as below

    <Header>

    <Company>USMF</Company>      <Action>schemas.microsoft.com/.../create&lt;/Action>

    </Header>

    did you get any solution for this. Please let me know if you have resolved.

    Thanks & Regards,

    Britto John Baskar.A

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans