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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Create a Note and an Attachment based on an URL

(0) ShareShare
ReportReport
Posted on by 352

Hi, in a Dynamics CRM 2016 OnPremise (ADFS and IFD have already been implemented) we have a form which collects latitude and longitude values while being executed in the Dynamics 365 mobile app and it store them in a custom entity. It works fine and values are correctly saved in their fields. Based on those values, we internally build an URL so it points to a Google Maps static map and store the URL itself in a field on the form. If you click on it, the map and the location is correctly displayed in an Internet browser. 

Now, our customer is requesting to create a Note in each record with the static map image (the one you can access clicking on the URL field) as an attachment. This process needs to be performed as the final step of the process (1: collect the coordinates, 2: create the URL 3: create the note with the attachment)  of creating, updating the record in the custom entity. Users of the mobile app will only have Internet access in their mobile devices and not at their workplace desktops.

Do you have an idea if this is possible? Because of the requirement I assume a plugin need to be developed and in this case I would appreciate your help point me to some code I can analyze.

Regards,

Xavier

*This post is locked for comments

I have the same question (0)
  • Thomas David Dayman Profile Picture
    11,323 on at

    I'm not sure about how to complete all your requirements but I do know how to add a HTML Attachment with a link in the Notes

    You will need to add the HTML code in the documentbody of the Note:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="refresh"content='0; url=URL'/>
    </head>
    <body>
    </body>
    </html>


    The URL should be whatever your link should be. Then when ever a user clicks the attachment it will download the html and open the link on the browser.

  • Xavier Villafuerte Profile Picture
    352 on at

    Thanks, but that does not solve the problem. The main issue is my customer employees have a really tight Internet access policy and they do not have access to it from computers inside the company campus. What if I call the URL pointing to the static map from a SSRS report as en embedded image? Do you know where the call to the static map URL come from? From the SSRS server maybe?

  • Emre GULCAN Profile Picture
    2,379 on at

    Hi Xavier,

    Maybe you should try take a screenshot (with code) when you create your map url. There are several service or code examples (native or with component) and I think they can help you.

    For your steps; when you create a record (on custom entity) with coordinate values, create a url (use codebehind / plugin - workflow) and after get valid url request to this url and get html response. this will be string response with all html.

    but if you use some "grabbing" components, you can take screenshot of this url.

    after that you can save it in notes that related with your custom record

  • Suggested answer
    Community Member Profile Picture
    on at

    Check this link. This is in JavaScript but you can do the same in C#. With a little it more work, I hope you will be able to achieve it.

    www.aspsnippets.com/.../Export-Convert-Google-Maps-to-Image-using-Google-Maps-API-V3-Static-Maps-API.aspx

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

News and Announcements

Season of Giving Solutions is Here!

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
Shidin Haridas Profile Picture

Shidin Haridas 2

#1
Shidin Haridas Profile Picture

Shidin Haridas 2

#3
Abdullah13 Profile Picture

Abdullah13 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans