Skip to main content

Posts

Showing posts from June, 2018

Testing #MSDyn365FO Odata with Postman

Last year I posted on using Postman. Things have changed since then and I need to update. http://dynamicsnavax.blogspot.com/2017/05/dynamics-365-for-operation-web-service.html There is a good article that Microsoft has written which I followed without any issues. https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/third-party-service-test#prerequisites Below are some screenshot incase you are a visual person like me. In the environment set ups. It should looks something like this. When you run it, you should get a response. Once you got the token. You are good to go with your messages. Below is the same example from the blog post. You run into any problems, click on the console icon at the bottom. Should give you a bit more information. If you get a 401 error. It is usually a typo. Make sure you got the spaces and backslashes correct. One simple character can drive you crazy.

Import document handling (attachment) files #MSDyn365FO

Out of the box you have limited data entities for migrating attachments. If you search what is already in the AOT, you will see a few various examples. I suggest you look at the LedgerJournalAttachmentsEntity as it is the simplest and cleans to copy from. I wont go into detail but I will give a quick run down of what it looks like. Use the DocuRefEntity as your main datasource. It does most of the work for you. Set your table you want to import for as the child datasource Add the Key You will need to add the postLoad method. There is minor code to update the virtual field FileContents. Below is an export I did for the general journal attachments. The import zip structure should be the same way. It will create the usual artifacts such as the excel, manifest and package header xml files. You will see a Resources folder under that. If you drill down to the resources you will see the attachments. This is an export and it used the document GUID for uniqueness. The other thing is the extensi