Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8983449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:50:38+00:00 2026-06-15T20:50:38+00:00

I have the gotten a certain result from the Notes tab. The link you

  • 0

I have the gotten a certain result from the Notes tab.

The link you see inside the iframe is the name of the file.

I have the DocumentBody from the annotation in some format that looks like base64.

How do I download it?

Save base64 string to the client as a file

Thanks,
Fabio

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:50:40+00:00Added an answer on June 15, 2026 at 8:50 pm

    I had already the base64 documentbody string extracted like this:

    function getSla() {
        // Define SOAP message
        var objectId;
        if (typeof crmForm === "undefined") {
            objectId = parent.crmForm.ObjectId;
        }
        else {
            objectId = crmForm.ObjectId;
        }
    
        var xml =
            [
            "<?xml version='1.0' encoding='utf-8'?>",
            "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" ",
            "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ",
            "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">",
            GenerateAuthenticationHeader(),
            "<soap:Body>",
            "<RetrieveMultiple xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>",
            "<query xmlns:q1='http://schemas.microsoft.com/crm/2006/Query' ",
            "xsi:type='q1:QueryExpression'>",
            "<q1:EntityName>annotation</q1:EntityName>",
            "<q1:ColumnSet xsi:type='q1:AllColumns' />",
            "<q1:Distinct>false</q1:Distinct><q1:Criteria><q1:FilterOperator>And</q1:FilterOperator>",
            "<q1:Conditions><q1:Condition><q1:AttributeName>objectid</q1:AttributeName><q1:Operator>Equal</q1:Operator>",
            "<q1:Values><q1:Value xsi:type=\"xsd:string\">",
            objectId,
            "</q1:Value></q1:Values></q1:Condition></q1:Conditions></q1:Criteria>",
            "</query>",
            "</RetrieveMultiple>",
            "</soap:Body>",
            "</soap:Envelope>"
            ].join("");
        var resultXml = executeSoapRequest("RetrieveMultiple", xml);
    
        var result = filter(resultXml.getElementsByTagName("q1:filename"), function (element) {
            return /master.*sla/i.test(element.text);
        });
    
        if (result.length == 0) {
            return null;
        }
        else {
            return result[0].parentNode;
        }
    }
    
    function getSlaDocumentBody(sla) {
        return sla.getElementsByTagName("q1:documentbody")[0].text;
    }
    
    window.open("data:application/pdf;base64," + getSlaDocumentBody(sla));
    

    It opened a new window with the string data:application/pdf………. in the address bar but did nothing. I would prefer that solution indeed.

    Ended up using srasmussen solution in here: http://social.microsoft.com/Forums/en/crm/thread/05134277-dd76-4fbb-8f6e-89b1a2a45af1.

    var URL = serverUrl + "/userdefined/edit.aspx?etc=5&id=" + slaId;
    
    $.get(URL, function (data) {
        var WRPCTokenElement = $(data).find("[WRPCTokenUrl]");
        if (WRPCTokenElement) {
            var WRPCTokenUrl = WRPCTokenElement.attr("WRPCTokenUrl");
            if (WRPCTokenUrl) {
                URL = "/Activities/Attachment/download.aspx?AttachmentType=5&AttachmentId=" + slaId + "&IsNotesTabAttachment=undefined" + WRPCTokenUrl;
                window.open(URL);
            }
        }
    
        return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have gotten a great deal of help from KandadaBoggu on my last question
I have a client who's wordpress sites have gotten hacked twice by iframe scammers.
I have gotten this to work nicely, but when speed hits a certain speed
I have a DLL file from which I need the memory address of a
I have gotten the following errors using ruby 1.9.2-p320 with Heroku's Taps-using 'db' commands
I have gotten myself into a catch 22 and cannot seem to find my
I seem to have gotten confused as to what the css clear keyword means.
I'm new to Java and have gotten myself into a situation where it's evident
After a recent submission I have gotten the following error: Invalid Signature - the
I have been learning Hibernate for the past few weeks, I have gotten most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.