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 :
Customer experience | Sales, Customer Insights,...
Unanswered

send PDF blob to Dynamics 365 CRM API

(1) ShareShare
ReportReport
Posted on by
I have to Generate a PDF and save it in Blob storage. I mentioned the below code to generate a PDF and send the form data details in CRMAPI.
 
 
 const generatePDFAndDownload = async () => {
        const blob = await pdf((<QuotationPDF formData={formData} />)).toBlob();
        const pdfName = `M365_${formData.userCompany.replace(/\s/g, '_')}_Quotation.pdf`;
        await saveAs(blob, pdfName);
        const data = {
            name: formData.userName,
            email: formData.userEmail,
            company: formData.userCompany,
            location: formData.userLocation,
            service: formData.userService?.map(service => service.title).join(', '),
            description: 'Quotation',
        };
        await CRMAPI(data);
    };

And this data sending in CRMAPI this API code is below.
 
export const CRMAPI = (data) => {
    var myHeaders = new Headers();
    myHeaders.append("Content-Type", "application/json;odata=verbose");
    myHeaders.append("Authorization", "Bearer 4352345342");
    let raw = {
        "Title": data.name ? data.name : "",
        "Email": data.email ? data.email : "",
        "Company": data.company ? data.company : "",
        "ContactNumber": data.mobile ? data.mobile : "",
        "Country": data.location ? data.location : "",
        "OfferSource": data.service ? data.service : "",
        "LeadSource": 8,
        "Requirements": data.description ? data.description : ""
    }
    var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: JSON.stringify(raw),
    };
    fetch("https://api.domain.domain.in/api/DynamicsCRM", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
}

So I want this downloaded PDF send in Dynamics 365 CRM list.
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 161 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 51 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans