I am working on an Outlook addin and we are evaluating to see if we can pass information from manifest file to the Javascript API callback.
Ex : we need some port information to be available in the manifest and this should be passed to the Javascript API callback on ItemSend.
Is there a way for this ?
I'm sorry but there is no way for JavaScript in your add-in to read its own manifest at runtime.
Like Rick mentioned, OfficeJS doesn't provide any straight mechanism for getting the manifest file content.
But you may consider your manifest file as any other file xml file hosted on the server, so you can read its content like any other file, of course, it is hosted on the web server somewhere (with your web application).
Related
When a WCF/REST or JSON service is created in Visual Studio with helpEnabled="true" in the web config, there will be a URL similar to "https://Server/Service/ServiceREST.svc/help". IIS will present a help page - see enclosed example.
I'm looking to modify this page, I want to exclude some lines.
Does anyone know how, or if that is possible?
According to your description, I would like to tell you that the help page of WCF WebHttp endpoint cannot be modified, and in fact there is no property or configuration to control it. You can replace it with your own custom page, but this requires writing a lot of code according to your needs. You can read about the schemas used in the WCF Web HTTP Services help page through this document.
I have an Angular html page that has script reference to the javascript. In the Javascript I am using Xrm object to make certain actions like Xrm.webApi.retrieveMultipleRecords etc..
This Angular Html Web resource is loaded as part of SiteMap. The Angular Html web resource also have script reference to "ClientGlobalContext.js.aspx" and able to access Xrm object.
If I remove the aspx script reference the Xrm object is undefined. Microsoft docs mention that this script reference doesn't make the Xrm object available but in my case it's exactly what it is doing.
Then I tried removing the "ClientGlobalContext.js.aspx" reference and started using parent.Xrm object and everything seems to be working fine again. But the Microsoft docs again said that parent.Xrm will not work if loading an HTML web resource as part of SiteMap which exactly is my scenario and seems to be working.
So need to know what I should do as I don't want to use any methods that's going to be deprecated.
Here is the link to the Microsoft docs: Screenshot of the issue
https://learn.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/getglobalcontext-clientglobalcontext.js.aspx
I had a similar problem using Xrm.WebApi object in a Web Resource as well.
See here: Using Xrm.WebApi method in Web Resource opened in a new window
The short answer is, is that the methods rely on JavaScript constants that are only loaded on the CRM pages. You can work-around the issue by providing your own constants, and copy the values from window.opener.top.
http://wopi.readthedocs.io/en/latest/build_test_ship/validator.html
As per this documentation, we need to build some HTML host page.
In this document, they mention one point that I didn't understand completely
The simplest way to use the validation application is to use the view
action. To use the view action hosts should treat .wopitest files the
same way other Office documents are treated. In other words, hosts
should do the following:
Launch a host page pointed at the .wopitest file. Ideally, this should
be the same host page used to host regular Office Online sessions.
This will allow the validation application to test things like
PostMessage and do some validation on the way the Office Online iframe
was loaded.
What is .wopitest file and what I need to do exactly, Can anyone please guide me ? please explain stepwise
They mean that you have to call that action in the same way you call any other action (looking for the action url in the discovery, etc.).
For example, when you want to open a .docx for view, you look into the discovery.xml and you find that you have to call https://word-view.officeapps-df.live.com/wv/wordviewerframe.aspx?", and of course you must have ready the Rest services for that action (checkFileInfo, etc.) and the WOPISrc pointing to a file that in fact is a .docx . Well, for the validation application is exactly the same, but you should call to WopiTest app instead of Word app (inside the discovery) and your generated WOPISrc should point to a file called "xxxx.wopitest" instead "xxxx.docx". That's it! ;)
I am using Spring to create a web application in which a user can upload a zipped folder containing an index.html file along with all it's resources(pretty much like an Adobe captivate generated webpage). The user should be able to request the uploaded web pages in the form of inner web pages.
I can only go as far as unzipping the folder itself, but I have no idea how to launch the index.html present inside the zipped folder.
How do I achieve this?
Quite honestly Spring has no restrictions or advantages over
displaying your subpages inside another page. However you can use Spring MVC to dynamically serve the web pages from the uploaded folder.
More over you have to play the tricks from browser side. Going with iFrame seems to be the best option from client side, though there are many other options. Please check this thread.
You can write some smart APIs in SpringController which accepts the folder path or folder name as parameter, picks the necessary pages from the requested folder and serves the user.
Another approach could be to use a headless browser for the server side rendering and give the output as screenshots to client. This can render the pages server side. Please check this thread for more details.
I hope this helps you!
i try to create a web site where it will provide an option to the user to upload a pdf file. I want this pdf to be saved on the server with specific url. For example:
The user select the title.
The user upload the file.
I want after these actions the file to be accessible via a specific url/name_the_user_give.
I saw that the Spring MVC provides very easy interface for file uploading.I already see many tutorial about this but my problem is how can i save the paper into a server.Also i want the pdf to open by the browser's tools.Can anyone give me directions?
To save the file on server path you simply needs to write the file stream to the path described by
request.getServletContext().getRealPath("your directory name here");
and then create the file using the real path you get.
And to show the pdf file using browser plugin, you should use following in your controller method.
#RequestMapping(value="url to map", produces={"application/pdf"})
Hope this helps you.
Cheers.