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 CRM (Archived)

How do I allow a generated custom file to be downloaded by the user in Dynamics CRM 2011?

(0) ShareShare
ReportReport
Posted on by 60

The problem is pretty straightforward.

I want the user to click a button on the ribbon of an entity, for that to run some C# code that will generate a PDF document using the Siberix library, and have the user be prompted for downloading the file.

In otherwords, the user just clicks the button, and the download dialog comes up.

I know some will suggest the Reporting facility, but that has been investigated and proved insufficient for our needs.

I don't need to have a full walkthrough, but I do need to know the general thrust of what I'm meant to do. Customising the ribbon shouldn't be a problem and through a workaround it should be able to trigger the plugin which could generate the file, but how you then get the user to be prompted to download the file is something I haven't figured out.

 

We're using Microsoft Dynamics CRM 2011 Online.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    A Custom aspx Page may help. When someone clicks the button on ribbon an aspx page opens with the id of the form as an query string. You can generate the pdf with this application. After file is generated you can show the link of it. to be downloaded

  • DavidC Profile Picture
    60 on at

    Thanks for the suggestion, but I'm using a Hosted CRM. I don't believe I can set up the Controller for the ASPX page to send a PDF filestream.

    If you know of a way I could have a custom aspx Page on a Hosted CRM Server to run some .NET code, that would be great (I'm still trying to figure out the intracracies of this system) as then I could try something like what you suggested; but since I'm unsure how to do that, I don't know.

  • Suggested answer
    Community Member Profile Picture
    on at

    This can perfectly be done with a SilverLight web resource.

    - You create your application logic in Silverligt

    - Add this component as a web resource

    - Call the Silverlight web resource from the button click in the ribbon.

    If you only want to have this for a certain entity I would:

    - Create a tab in that entity form

    - Add an iframe and call the silverlight web resource from there

    Hope that helps

  • DavidC Profile Picture
    60 on at

    Unfortunately, Silverlight isn't an option for us.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi David,

     I agree with what Erman has said. You could use an aspx page to generate the PDF file on the fly, but you need permission on your Hosted server to deploy some web pages. This should be fairly reasonable, but depends on what service you have got.

    Follow the below link on how to generate a PDF file on the fly.

    www.codeproject.com/.../Creating_PDF_documents_in.aspx

    Regards

     Abish

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans