简体   繁体   中英

CRM 2013 C# Plugin fill Word template

Im trying to create CRM plugin which will open Word template, fill it with data and download it to the user. This all work fine, except when I need to download document to the user. I know its not possible download it throught HttpResponse, so I dont know how I will tackle this.

Do you have any suggestion??

NOTE: here Dynamic CRM Plugin download Word document is the similar problem, which didnt solve the problem ,just sayed that is not possible throught HttpRequest.Response.

The only means for plugins to "communicate" with users is an Exception (obviously, we don't want that!), my preferred approach in these cases is to create an annotation (a Note) attached to the record which triggered the plugin, attaching the file to it.

You'd then be able to download the file via JS through OData/FetchXml.

I don't know how far you already mastered creating your word document from a template, but I think the best way to achieve this would be to have a report create it for you.

With creating the doc out of the way, you can now simply open the Report from a custom Ribbon Button as described by Jason Lattimer .

If you still have the need to perform any special processing only possible in your Plugin before returing the doc, you could replace the standard "Save" Button by your custom Button.

Crm 2011 is limiting your options - if you'd be on Crm 2013 or 2015 things would be a lot easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM