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
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.
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
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?
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.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156