Is it possible to embed an audio object (mp3, wma, whatever) in a web-enabled InfoPath form ?
If it is, how do you do it ?
#Martin
That works for local forms that open in InfoPath. Nathan was asking about web-enabled forms. ActiveX controls are disabled for web forms, as evidenced by the informational label at the bottom of the design controls when the form compatability has been set to the web.
Now, I will admit that I know nothing about the HTML tags to play audio in a browser, but I have something else that might work. I had an InfoPath form that I needed to dynamically load an image into for a web-enabled form. Similar to the ActiveX issue, the Picture control was also disabled. What I did was put some managed code behind the form and execute the following when the form loaded.
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
string imgPath = "http://yoursite/yourimage.jpeg";
XPathNodeIterator xpni = MainDataSource.CreateNavigator().SelectSingleNode("/my:FormName/my:RichTextControlName", NamespaceManager).SelectChildren(XPathNodeType.All);
xpni.Current.InnerXml = "<img xmlns=\"http://www.w3.org/1999/xhtml\" src=\"" + filePath + "\" width=\"200px\" height=\"55px\" />";
}
I don't see why you couldn't take the same approach and load audio rather than an image.
It looks like you can't embed <object> tags in a richtext field. I'm getting nothing when I do it.
Have you tried manually modifying the XSL in order to generate HTML which embedds your audio file?
I don't think there is a way to do this using the InfoPath Designer, but if it ends up in the XSL; it may just get passed through to the web enabled form.
Edit: My apologies, I missed that the question was about Web forms - for which the below does not work. Must learn to read the question fully!
Go to menu View
Click on Design Tasks
Select Controls in the 'Design Tasks' Task pane
Click on the 'add or remove custom controls' button to install your custom
control
Click on the Add button and select ActiveX Control
Select the Windows Media Player control
Select the necessary properties for databinding and finish the wizard.
After you have added the control, you can drag and drop the control on your screen.
Right-Click on the control and select the 'Windows Media Player properties'
Fill in the URL to automatically embed the file to play.
Related
I am using a "document library" (template: StdXLWebXDocLib). When I modify the Custom Control "fileDownload" and I put the <displayLastModified option = "true">, the modification date does not appear in Reader mode while it is displayed when i am in Edit mode.
Is this a XPAGES bug ? Anyone know the solution?
There are two different fileDownload control on that page, inside different facets of a dynamic content container. You should modify both.
What is the supported way to display an HTML webresource as a dialog ?
I have tried Xrm.Utility.openWebResource(webResourceName) but it's displayed as a webpage
Thanks
At the moment the only way to open your webresource in dialog mode is to use showModalDialog method of window. Check following url please - showModalDialog
If you're looking to display webpages inside a dialog in CRM 2013, as per my knowledge that is not possible.
However, in order to simulate what you're trying to achieve, you could design the entire dialog in HTML itself (having buttons like Next, and pages, etc.) and then display the HTML page as a popup using OpenWebResource. You can make use of the REST api of CRM to carry out the CRUD operations during the dialog progress.
Did you check the MSDN reference? You can control the width and height if that is what you are trying to achieve.
You can use:
Xrm.Internal.openDialog(address, settingsobject, null, null, return function)
var settingsobject=new Xrm.DialogOptions;
settingsobject.height = 420;
settingsobject.width = Xrm.Page.context.client.getClient() === Xrm.ClientNames.mobile ? 500 : 450;
My CRM is configured in outlook , and i need to add File attachment in campaign form , I tried Customize->Form... But i cant find File attachment in Field Explorer..
So how to add this, as shown in image...
thanks.
In CRM Dynamics 2011 there is no control for file explorer. You have to add a control like that through a Webresource (HTML5 or Silverlight) or Iframe that points for an aspx page.
Your screen shot looks like a custom development that isnt a standard control. That said you will probably achieve what you want by just adding the notes grid to your form. A note can have attachments and has a standard file explorer.
Go back into customising the form, click the insert tab on the ribbon, click notes.
It’s not that hard to knock something up in Silverlight. The annotation entity is just a normal entity and can be written to just like any other. Here is a screen shot of it integrated into a normal CRM form. The control allows you to drag and drop files or click the upload button to be presented with a file dialog box
Oh and one last helper point, the document is stored in the attribute “DocumentBody” as a base64 encoded string. You can then read that and convert it into a byte array to save to disk etc
I am currently on a project redesigning an existing traditional domino web application to XPages. This application contains a web form with quite a lot of helper dialog boxes. Also notifications and validation and confirmation is done through dialogboxes.
I know I can create a custom control for each dialog box and add it to the Xpage and call the show. I even managed to load it dynamically using a dynamic content control with a facet for each dialog. Since the dialog cc contains a show() in the onClientLoad. It is easy to open a dialog by switching the content of the dynamic content control.
Still, adding all these custom controls to my XPages feels inefficient and really clutters the design tab. What's your take?
I would prefer setting the content of the dialog dynamically (Like in traditional domino you would define a form for each dialog). Is that possible?
If not is it possible to load a custom control dynamically (Like using a computed subform)?
Also for confirmation boxes I need the OK button to execute different code for each confirm. What would be the best way to implement that? Add custom parameter "functionOnOk" to the "dlgConfirm" custom control and evaluate that in the submit button?
PS: I am still using panels with dojoType=dijit.DialogBox, but will change those to extlib dialog boxes. For the confirm and messageboxes I am now using client side dijit.Dialogs with mark-up in code, but I would like the markup in XPages as well.
I know there are issues with panels with dijit.Dialog, because Dojo moves the dialog in the DOM, which prevents any SSJS in the dialog running. I don't know if that's also an issue with dijit.DialogBox, but I suspect it could be. Jeremy Hodge did some code to workaround that.
However, I would strongly recommend using the Extension Library control. Client-side dijit.Dialogs are likely to be much more difficult to code and will not allow any SSJS interaction. I'm not aware of any Dojo properties not available in the Extension Library control, and the Extension Library control also allows you to open or close the dialog both in CSJS or SSJS. It also allows you to specify an area to refresh on close.
In terms of the properties, preload is there purely to speed up showing. Are you using the refreshOnShow property? This ensures the URL or content is refreshed each time the dialog is shown. The Extension Library chapter on dialogs has a table covering all the properties. You can set the URL to point to another XPage or another web page. This may allow you to use the Dynamic Content control to pass parameters to switch the content that should appear.
In terms of the code behind the OK button, if you use the Extension Library dialog, you have all the functionality you would have outside the dialog.
I have already asked the same question but in regards with MDI Application design. Now just for R&D purpose so that we can go with 2 solutions to our user. Can somebody plz help me out...
We are developing an OutLook Style Application using C# Winforms. In that application we are using Microsoft Table Control. Which is what we need to show our UI. In the left hand pane we have menu and in the right hand we are displaying our UserControl. Like CustomerManager. This UserControl is doing Adding, Updating, Deleting ect etc but we want to put the common action buttons, Like Add,Delete,Save on the top toolbar.
So far so good, Now what we need to acheve is regardless of UserControl. What ever UserControl is loaded in the MainForm's TableControl. When the save button is clicked it should process the data on that UserControl. Obviously we will write the logic of the Save Action on each UserControl.
Please help...
Regards
Shanx
I may advice you the Krypton Toolkit. You will write an Outlook style app in seconds.
For all who ended up here like me in search of a free toolkit: As Vulkanino suggested to use Krypton, I loooked it up.
This is now open source Freeware and can be found unter: Krypton Toolkit
Create a Base user control that contains your Add, Delete, Save methods and events. Then create every other functional control that inherits from the Base control.
When you action the main toolbar buttons, you can safely cast each user control in your given container, to the Base user control.
Some MSDN links you might want to read up on:
http://msdn.microsoft.com/en-us/library/44a9ty12(VS.80).aspx
http://msdn.microsoft.com/en-us/library/ms173149(VS.80).aspx