Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Extracting Invoices as XML

(1) ShareShare
ReportReport
Posted on by 80

Hello, first time posting.

I have been tasked with building a plugin which would allow the user to extract invoices from Microsoft Dynamics CRM 2013. I will most probably build it in C#. I have downloaded the SDK and started browsing through the sample code, though I have not found anything of use so far. 

I would like to ask: 

1. Does anyone have a good guide for something similar? I'd like to extract every piece of data possible from invoices between 2 certain dates into an XML document.

2. Are there any major differences between 2013 and Online I should watch for? I'll probably be testing with Online, even if the final product is for 2013. 

Thank you very much for all your potential help. 

*This post is locked for comments

  • Suggested answer
    Morne Wolfaardt Profile Picture
    on at
    RE: Extracting Invoices as XML

    The ODATA Rest endpoint is ATOM that is XML based, you can use that to return your response, and you can build up the filter using url

  • Suggested answer
    Bruno Lucas Profile Picture
    5,421 on at
    RE: Extracting Invoices as XML

    Hi,

    one option is to create a custom report. custom reports have the option to save as xml.

    you can also run the report  against 1 or multiple records and customize your report to return all the invoice data that you need.

    crm reports use SSRS reports:

    http://msdn.microsoft.com/en-us/library/dd283112(v=sql.110).aspx

    Do you have to extract it under some specific xml format/structure?

    otherwise you can check Nuno's suggestion

    Be aware that when you deal with file manipulation\creation, you may not be able to register that on a crm online plugin or workflow because of the cloud sandbox.

    you may be able to do that also though javascript and invoke though a ribbon button, but the code may get long and messy like this:

    http://xrmmatrix.blogspot.co.nz/2011/06/creating-report-as-pdf-attachment-in.html

  • Nuno Profile Picture
    2,005 on at
    RE: Extracting Invoices as XML

    Hi,

    I am not sure if it is possible to download the XML file generated through the plugin.

    A possible way to get yout task done is through a workflow, that when executed gathers the information of all selected (by the user) invoices, builds the xml file with the information you want, attaches the file to an email and sends it.

    You can also create an application like a console applicaiton, schedule task or windows service that connects to CRM, creates the file and save it.

    msdn.microsoft.com/.../gg695810.aspx

    msdn.microsoft.com/.../gg695803.aspx

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,296 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,093 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans