web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Notes , PDF's and custom workflow

(0) ShareShare
ReportReport
Posted on by 1,703

CRM2016 On Premises

I have a custom entity that when a record is created it executes a vb code workflow. part of that workflow is to generate a pdf from SSRS.  Is it possible , instead of physically creating the pdf file to disc .. create it as an attachment on the notes for the calling record .

Ie if I add record 1 .. it executes my workflow, does a few bits and then fire the SSRS and in a sense save the pdf to the notes field 

I know there is information to add the pdf to an email without creating the physical file on disc, can this work the same way with notes

result = rs.Render(format, devInfo, extension, encoding, mimeType, warnings, streamIDs)

simple terms I want my workflow to create a PFD and add that pdf to the record that executed the workflow

*This post is locked for comments

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    I am not exactly sure what code you have written but looks like you have something as mentioned in the below blog-

    www.akaes.com/.../ms-dynamics-crm-2013-generating-ssrs-report-as-pdf-using-plugin

    Now if this Render method returns byte array i.e. byte[] then yes you can save the attachment to notes as well. You can refer the below links for reference-

    docs.microsoft.com/.../sample-upload-retrieve-download-attachment

    community.dynamics.com/.../240077

    Hope this helps.

  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    As suggested by Ravi, you can have a look at the links to see how you can generate the report.

    And since you are planning to do the PDF creation in the workflow, you could create a custom workflow activity to create the PDF and attach it to the note of that record that workflow running against.

    If you are not familiar with creating Custom Workflow Activities, please visit the following links

    docs.microsoft.com/.../create-custom-workflow-activity

    docs.microsoft.com/.../sample-create-custom-workflow-activity

    www.c-sharpcorner.com/.../creating-word-counter-custom-workflow-activity-in-dynamics-365

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    The Render operation provides you a bytes array. You can take that and upload it to a note record using the base64 encoded data into the documentbody field. See example of how this is done here: mohitraghav.blogspot.com/.../crm-sdk-uploaddownload-attachment-to.html

    It's older version of Dynamics but still works...

    Hope this helps.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans