Announcements
Previously I have asked this question here - community.dynamics.com/.../984690, but
I have some misunderstanding. I was advised to use this sample of code for import from here - github.com/.../DataPackageHandler
To make it work with Dynamics I must configure azure storage for dynamics in this way - github.com/.../wiki
Is that all that I have to do to make imports to dynamics, so that documents will appear in attachments ?
Can you please elaborate what you did? When saying that you added an entity, what does it mean? Where did you add it and how? Please realize that we depend on information and if you don't do your part, we can't help you.
Also, the first sentence is wrong. The part "I'll have to create a new entity" is correct but "use EcoResDocumentAttachmentEntity or LedgerJournalAttachmentsEntity" is not. Building a new entity and using an existing one are clearly two different things. You were told that you can look at the existing entities for an inspiration on how you can create your new entity.
Regarding examples, it's not clear what kind of example you want. I thought you wanted to use data management APIs (you have an example in your own above question), but your last screenshot looks like OData. Please explain what you're doing and therefore what examples you're interested in.
It was mentioned above that in order to create document attachments, I'll have to create a new entity that can do that and use EcoResDocumentAttachmentEntity or LedgerJournalAttachmentsEntity, for instance.
I used LedgerJournalAttachmentsEntity, after adding this entity, LedgerAttachment class was accessible for use, I thought with the help of that class I will have an opportunity to send files to dynamics f&o.
The export procedure consists of the following steps:
1)I collect all data in my environment, I have inputted values to fields and tables for VendorPaymentJournal
2) After all data is prepared I send it to dynamics (I showed above screens where all data appeared after I export it to dynamics)
My aim is to send documents to attachments together with all data (fields, tables). Could you, please, provide link or sample of code, where it's shown how to send files to dynamics from simple Console Application ? What should be used for this ?
... nevertheless I don't see any entity with public name LedgerAttachment (LedgerJournalAttachmentsEntity isn't public at all). Maybe it's something custom, but then I can't comment on its implementation.
I looked into 10.0.0.5; I'll check a newer application later.
Aha, so you're not talking about F&O code - it's a proxy class in the client application, in C#. And the C# method calls the OData action exposed by the data entity.
Regarding export and import, please distinguish what you're doing at which step and don't use the words interchangeably. Otherwise you don't know what's failing and you can't effectively communicate with others.
I don't think you ever mentioned how you export the data; you kept talking about calling OData services. Can you please explain your export procedure?
You should do one thing at a time. If you don't know how to extract the data, don't waste with imports just yet. Solve exports first and only then move to the other step.
I want to import data do dynamics, by exporting data from my environment.
I need to send files to dynamics
This is the class, which I mentioned
Don't you confuse works "export" and "import"?
You said that you wanted data to appear in an AX form after you export them from an environment, but that would require an import.
Also, the error you get suggests that you're actually importing (conflicting) data, despite that you said you're making export.
Why exactly do you want to use some classes instead of data entities, as we suggested? I even didn't see LedgerAttachment class in my application - what it is?
I tried to make export with the use of all fields that are mentioned above, but I get this error
This value is already defined in Vendor Journal, so what should I do
I use VendorPaymentJournalFee type of export,
so all fields with tables appear here after I export them from my environment to Dynamics
I need to transfer attachments together with all data (fields, tables) in such a way that, attachments will appear in a new Journal Item, that I exported to Dynamics. I mean here
For export of my Journal items to dynamics from my environment I use VendorPaymentJournalFee class. Make instance of it, filling and sending to dynamics.
How I must combine it together with LedgerAttachment instance ( I read that this instance is used for exporting attachments to dynamics). For example :
I have filled Journal entity and I need to make attachment for it, how I can Implement this ?
Hi Dynamics Questions,
I recommend to create a new entity for your needs (as described in the article) at first (or use existing) and create an example in D365. Then you can export it from D365 and you will get an almost workable package for import. From this package, you will get an idea of what fields and how to fill them.
Important fields:
DocumentId - should be unique
FileContentsFileName - should match filename from Resource folder.
You can import this package via data package API or recurring API.
BR, Sergei
André Arnaud de Cal...
294,120
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator