Some links from botframework do not open in MS Teams - botframework

I want to display an adaptative card with an openUrl action to a sharepoint page.
The sharepoint url contains some filters and looks like : https://xxx.sharepoint.com/sites/main/Recherche/results.aspx?k=Annee:'2018' AND Group:'test'
From Teams client on windows, clicking on the team doesn't work at all (no action)
On web client, it opens a new teams on the source conversation I clicked the link on.
It probably comes from specials chars and encoding (stripping the last part after the colon make it work) but I didn't find the proper encoding to work with the full link.
BTW, the full link works in Bot Emulator and Skype for Business.

I'm not sure what encoding you tried, but the : characters in the URL are causing the problem because they aren't allowed. There's no way for me to test this, but if you call encodeURI on the string and set that as the value of url it should work:
encodeURI("https://xxx.sharepoint.com/sites/main/Recherche/results.aspx?k=Annee:'2018' AND Group:'test'")
returns
"https://xxx.sharepoint.com/sites/main/Recherche/results.aspx?k=Annee:'2018'%20AND%20Group:'test'"

Related

URL Scheme with argument in windows

Say I want to open this dictionary application by calling name://word. I followed this answer and successfully register the url scheme. However, if I visit name://example in my browser, it does open the app but it passed the whole url name://example. As a result, my dictionary app search for name://example string. I want to search for example only. How do I do it?

Slack API slash command stripping out hyperlinks

I have created a slash command in Slack and am successfully receiving the relevant payload from that slash command. However, when the user creates a message that contains an embedded hyperlink, that link is being stripped out of the message and isn't included in the message payload.
For example:
This message contains a link
...gets converted to:
This message contains a link
Oddly, the link is successfully passed through as part of the payload if the user types a naked URL in their message, but it does not work if they create a link using the 'link' button in the Slack UI.
As per the docs, I have enabled the option "Escape channels, users, and links sent to your app" but this doesn't seem to fix the problem.
Can anyone help? How can ensure embedded hyperlinks aren't stripped out of the message payload?
Slack unfortunately haven't spent much time on slash commands since launch, and one of the things they don't support are links, as they were only added recently to the client's rich text editor.
Previously there was no way to create a link to a non-slack resource without pasting the full URL, so the slash command isn't sent it.
Your best option, if you are trying to do something with a link, would be to respond ephemerally to the user stating this and asking them to send the full URL via the slash command instead.

How to share information between cooperating Firefox WebExtensions

I want to create a straightforward extension for Firefox.
User hovers over some word on any page
Pull the dictionary definition of that word from a file inside the extension
Display it while still hovered
I am new to Firefox add-ons and WebExtensions, so here's what I'm wondering:
I want the dictionary file(s) used by the extension to be local, instead of referring to some online website each time.
Any given user might be interested in a different part of the entire dictionary (it contains entries in different languages, users might only want their own 1 or 2 languages) so I want to avoid forcing every user to download the entire dictionary base.
The way I have seen similar add-ons handle that before Firefox 5.* is that they offer the search-and-display add-on separately from the dictionary files which are each available as add-ons in their own right, only actually doing stuff if you have the master add-on installed.
However, none of those examples seem to have been updated for the WebExtensions API and do not support more recent versions of Firefox.
I have also been unable to find how to communicate between web extensions so far.
My question being, how can I share information between 2 or more coorperating extensions to achieve what I described.
And actually, if this seems really stupid for some reason I'm unaware of, do point out any more reasonable alternatives that allow me to handle the dictionary files separately from the main extension.
Possibly related questions I found:
Communicating between 2 Firefox Add-Ons (Cross-Extension Communication)
This one is from 2010 however, thus out of date as far as I could tell.
Mozilla Addon Development - Communicating between windows with different domains
Kind of a similar situation, but they want to pull the definitions from an online source, rather than a local one.
The closest thing I found on the Mozilla browser extension website is communicating between add-on and some native applications, not quite what I need I think.
Communicating between add-ons is a normal part of the functionality of runtime.sendMessage(), runtime.connect(), runtime.onMessage, and runtime.onConnect.
Both runtime.sendMessage() and runtime.connect() have as their optional first parameter:
extensionId
For runtime.sendMessage(), this is:
string. The ID of the extension to send the message to. Include this to send the message to a different extension. If the intended recipient has set an ID explicitly using the applications key in manifest.json, then extensionId should have that value. Otherwise it should have the ID that was generated for the intended recipient.
If extensionId is omitted, the message will be sent to your own extension.
For runtime.connect(), this is:
string. The ID of the extension to connect to. If the target has set an ID explicitly using the applications key in manifest.json, then extensionId should have that value. Otherwise it should be have the ID that was generated for the target.
Both runtime.onMessage, and runtime.onConnect provide a sender property or parameter, either with the message, or as part of the port. This parameter/property is a runtime.MessageSender which includes an id property which is:
id
string. The ID of the extension that sent the message, if the message was sent by an extension. If the sender set an ID explicitly using the applications key in manifest.json, then id will have this value. Otherwise it will have the ID that was generated for the sender.
Note that in Firefox, before version 54, this value was the extension's internal ID (that is, the UUID that appears in the extension's URL).

Send Email with pdf file as attachment in rhomobile

I want to send email using mailto tag with a single pdf file as attachment.
mailto tag opens the mail window with passed arguments like to and subject using:
Mail to Manager
But, attachments as a parameter isnt working.
Please suggest how to send pdf attachment in rhomobile.
Thanks
I think that you need to add the physical path to the PDF file for it to work (otherwise it may not know where the file is). This post on a forum says as follows:
The only problem is that this "mailto" command executes on the
client machine, therefore it tries to locate the attachment file by
a physical path, and not by a virtual path.
That is,
Using mailto:iudith.m#zim.co.il?subject=my report&body=see attachment&attachment="\myhost\myfolder\myfile.lis"
works ok, but only for local users (those connected to the same
network as the "myhost" machine).
Using mailto:iudith.m#zim.co.il?subject=my report&body=see attachment&attachment="http://myhost:myport/my_location_virtual_path/myfile.lis"
does not work, it does not recognize such a syntax as valid for
the attachment file.
In your case you would properbly need to look at this part of the Rhomobile docs (on file system access) to get the right path to your file.
EDIT:
From you comment I can see that you are trying to make it work on iOS (due to the iOS specific path).
In this discussion (from Rhomobile's Google Group) it is explained that mailto doesn't support attachments on iOS. It says as follows:
Don't know about other platforms, but you cannot do this on iOS. mailto: does not support attachments on iOS.
You can do it using a native API, MFMailComposeViewController.
This is a complete controller with UI, so you would have to write a Native View Extension to use it:
http://docs.rhomobile.com/rhodes/extensions#native-view-extensions
EDIT 2:
I've looked around and it seems that mailto doesn't support attachments on Android either. This is because Android supports the RFC 2368 mailto protocol, which doesn't include attachments. Here is a reference to the Android mailto url parser.
I would suggest that you do as suggested for iOS, write a native extension. I think this post would be relevant for you.

window.print() problems in Dynamics CRM 2011 forms

We've been implementing a Dynamics CRM 2011 solution where one of the requirements was to print out a bespoke-styled form containing sub-grids and charts. The short story is that clicking on a "print" link (which calls the window.print() method) throws up a series of JavaScript errors. These, however, are non-fatal and clicking through each will allow the form to be printed OK.
Line: 73
Char: 24234
Error: The value of the property 'isNull' is null or undefined, not a Function object.
URL: https:://aks7.crm4.dynamics.com/_static/_forms/controls/img.lu.htc?ver=-115872263
(note that the double colon above was intentional!)
One of our early thoughts was that the problem was down to unsupported customisations, so as a test I created a new entity with a basic form. On the ribbon I added a print button which calls the window.print() method. The result is exactly the same. I've also replicated the issue on CRM Online.
The upshot is that either using window.print() is unsupported, or we've found a bug or both. Is there a solution to this?
I suspect that it's unsupported since the native print functionality renders a different page before sending to print (suggesting that this is a workaround for some feature of their .htc files).
Can you not take the same approach? The stub URL for the "Print Preview" is at .../_forms/print/print.aspx?allsubgridspages=true&formid=<form-guid>&id=%7b<record-guid>%7d&objectType=<object-type-code>. You could wrap this is a HTML web resource and call the CRM print button function from your HTML holding frame.
Instead of using the window.print, you have to automate the print preview.
I use this, but it's unsupported:
parent.document.getElementById('Mscrm.Jewel-Default').children[0].click();
parent.document.getElementById('Mscrm.Jewel.PrintPreview-Menu16').click();
http://blog.customereffective.com/blog/2011/08/printing-in-crm-2011.html

Resources