Decimals translated by browser when a dropdown is used - browser

The dot is removed by the browser and results in a value of 25 if you choose 0.25 (hence the error below).
The example config with listitems results in a dropdown in TFS. This works fine in Firefox. Chrome and Internet Explorer remove the dot and e.g. transform the value 0.5 to 5
<FIELD name="Effort" refname="Microsoft.VSTS.Scheduling.Effort" type="Double" reportable="measure" formula="sum">
<HELPTEXT>The estimated effort to implemented the backlog item</HELPTEXT>
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="0" />
<LISTITEM value="0.25" />
<LISTITEM value="0.5" />
<LISTITEM value="1" />
<LISTITEM value="2" />
<LISTITEM value="3" />
<LISTITEM value="5" />
</ALLOWEDVALUES>
</FIELD>
It can be solved for Internet Explorer by putting English as language preference, but that is not a solution since most of our users have set Dutch. Setting the dot as a decimal separator isn't a solution either, because Dutch uses a comma for that.
How can I solve this without bothering the end user?

You need to define a control field .Please follow this tutorial it will surely help you.
Click here Control field numberFormat
or you can also try my sample
<Control Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.Effort" Label="Rough Estimation:" LabelPosition="Left" NumberFormat="DecimalNumbers" />
Feel free to ask if it not work .Thanks

Someone from Microsoft found the issue and they are solving it;
"FYI, we found this to be an issue with localization. We are fixing it 😊"

Related

Template10 FocusAction to move focus after Enter key?

Is it possible to use FocusAction to move focus to another control from a KeyBehavior? If so, an example would be helpful. TIA
Fascinating.
This is what does NOT work:
<TextBox x:Name="T1">
<Interactivity:Interaction.Behaviors>
<b:KeyBehavior Key="Enter">
<b:FocusAction TargetObject="{Binding ElementName=T2}" />
</b:KeyBehavior>
</Interactivity:Interaction.Behaviors>
</TextBox>
<TextBox x:Name="T2" />
But I love the idea and I will add it to the behavior soon.
In the meanwhile, there is no declarative way to do it without a custom something you create. BTW, I tried this (also does NOT work):
<TextBox x:Name="T1">
<Interactivity:Interaction.Behaviors>
<b:KeyBehavior Key="Enter">
<Core:CallMethodAction MethodName="Focus" TargetObject="{Binding ElementName=T2}" />
</b:KeyBehavior>
</Interactivity:Interaction.Behaviors>
</TextBox>
<TextBox x:Name="T2" />
Does not work because Focus has parameters and the behavior does not support passing parameters. Though I wish it would.
Great idea though. Sort of like forcing TAB, huh? Cool.
Jerry

CRM2011: create a role that is able to delete invoice products, but not able to delete the invoice

Is that possible to define a security role that is not able to delete any invoice but able to delete invoiceproduct of any invoice?
The environment is not customized, and the definition( Tab:Mscrm.Form.invoicedetail.MainTab-->Group:Mscrm.Form.invoicedetail.MainTab.Groups-->Group:Mscrm.Form.invoicedetail.MainTab.Save-->Controls:Mscrm.Form.invoicedetail.MainTab.Save.Controls) for the ribbon button is
<Button Id="Mscrm.Form.invoicedetail.Delete" ToolTipTitle="$Resources:Mscrm_Form_Other_MainTab_Management_Delete_ToolTipTitle" ToolTipDescription="$Resources(EntityDisplayName):Ribbon.Form.Tooltip.Delete" Command="Mscrm.DeletePrimaryRecord" Sequence="70" LabelText="$Resources:Ribbon.HomepageGrid.MainTab.Management.Delete" Alt="$Resources:Ribbon.HomepageGrid.MainTab.Management.Delete" Image16by16="/_imgs/ribbon/Delete_16.png" Image32by32="/_imgs/Workplace/remove_32.png" TemplateAlias="o2" ModernImage="Remove" />
And the corresponding Command Definition is
<CommandDefinition Id="Mscrm.DeletePrimaryRecord">
<EnableRules>
<EnableRule Id="Mscrm.FormStateNotNew" />
<EnableRule Id="Mscrm.EntityFormIsEnabled" />
<EnableRule Id="Mscrm.CanDeletePrimary" />
</EnableRules>
<DisplayRules>
<DisplayRule Id="Mscrm.DeletePrimaryEntityPermission" />
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="onActionMenuClick" Library="/_static/_forms/form.js">
<StringParameter Value="delete" />
<CrmParameter Value="PrimaryEntityTypeCode" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
It seems it is not able to create such a role meet the requirement.
because
1. In the 'displayrule' section, it needs 'Mscrm.DeletePrimaryEntityPermission' permission.
2. In the 'enablerule' section, it needs 'CanDeletePrimary' permission.
Thanks in advance
I believe that's not possible using OOB functions. I would suggest to develop the plugin that will handle Delete message of invoiceproduct and throw an exception if user doesn't have required role.

EntityRule in subgrid on custom entity not working

I tried to add a button to connection subgrid ribbon. This button should only be visible if the primary entity equals 'new_visitreport'.
Here is my try:
<CustomAction Id="Visitreports.connection.customAction"
Location="Mscrm.SubGrid.connection.MainTab.Management.Controls._children"
Sequence="15" >
<CommandUIDefinition>
<Button Id="Mscrm.SubGrid.connection.AddXYZ"
ToolTipTitle="$LocLabels:Button.AddXYZ.Label"
ToolTipDescription="$LocLabels:Button.AddXYZ.Tooltip"
LabelText="$LocLabels:Button.AddXYZ.Label"
Command="Button.AddXYZ.Command"
Image16by16="$webresource:new_XYZ_16"
Image32by32="$webresource:new_XYZ_32"
TemplateAlias="o1" />
</CommandUIDefinition>
</CustomAction>
<CommandDefinition Id="Button.AddXYZ.Command">
<EnableRules></EnableRules>
<DisplayRules>
<DisplayRule Id="EntityEqualsVisitreport" />
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="openDialog"
Library="$webresource:new_script_open_dialog">
<StringParameter Value="3EEE3AE1-5543-433E-8123-6A14EA925A96" />
<StringParameter Value="3EEE3AE1-5543-433E-8123-6A14EA925A96" />
<BoolParameter Value="false" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
<DisplayRule Id="EntityEqualsVisitreport">
<EntityRule AppliesTo="PrimaryEntity"
EntityName="new_visitreport" />
</DisplayRule>
It seems that this rule always returns false. If I remove the display rule from command definition the button is visible, but independet of the currently primary entity.
Is there any mistake in my examply or is it not working for custom entitis although it is supported? (MSDN article)
Try using FormEntityContextRule it looks like these guys had the same issue you had. Forum Link
<FormEntityContextRule EntityName="account"/>

Embed a video object in html

I have this assignement where I have to used export for web in quicktime pro 7. Then copy/paste the read me.html file into the body (exactly as it is), which I did.
However, I keep getting 3 errors when I run my .html through W3C and cannot figure out how to correct it.
I realized there are probably better way to embed object but this is how they want us to do it for this assignment. Can anyone help me correct these 3 errors please.
Many thanks in advance.
<object width="350" height="278">
<param name="src" value="swiss/swiss-poster.jpg" />
<param name="href" value="swiss/swiss.mov" />
<param name="target" value="myself" />
<param name="controller" value="false" />
<param name="autoplay" value="false" />
<param name="scale" value="aspect" />
<embed width="350" height="278" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
src="swiss/swiss-poster.jpg"
href="swiss/swiss.mov"
target="myself"
controller="false"
autoplay="false"
scale="aspect">
</embed>
</object>
Line 1 : Element object is missing one or more of the following attributes: data, type.
Line 14: Attribute href not allowed on element embed at this point.
scale="aspect">
Line 15: Stray end tag embed.
I just needed to embed a quicktime movie myself, and I looked to the Mozilla Developer Network for the syntax: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object
I believe that the data attribute would take the place of href in your params:
param name="href" value="swiss/swiss.mov" />
would be:
<param name="data" value="swiss/swiss.mov" />
and the type in this case would be "video/quicktime":
<param name="type" value="video/quicktime" />
There is also an <embed> reference at MDN (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed), but it covers only the HTML5 version of the element, which doesn't require a closing </embed> tag.
The reference at sitepoint (http://reference.sitepoint.com/html/embed) addresses the earlier syntax, and also says:
"embed isn’t part of any currently recognized standard (it is included in HTML5 which is not yet finalized), so if you use it, your page can’t possibly validate".
That suggests that with <embed> you should probably focus more on actual behavior in the browser than the W3C's validation tool.

Ext.net 2.0 ComboBox, tiny bug

I have a very tricky issue which bothered me really long..
I was trying to use Ext.net 2.0 combobox to display options from remote DB. Everything works fine, but there is only one issue, when the page first loaded, if I do not change a selection of the combo, in c#, the combobox.value equals to the text instead of id.
Database is very easy: 'Test_table' has two columns, one called Tid, the other is TextContent.
My frontend code:
<ext:ComboBox ID="TestCombo" runat="server" Editable="false" DisplayField="TextContent"
ValueField="Tid" TypeAhead="true" AllowBlank="false" EmptyText="Select a text
id..." SelectOnFocus="true" FieldLabel="test text">
<Store>
<ext:Store ID="TestStore" runat="server" AutoLoad="true" AutoDataBind="true"
OnReadData="testStore_RefreshData">
<Proxy>
<ext:PageProxy>
</ext:PageProxy>
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="Tid">
<Fields>
<ext:ModelField Name="Tid" />
<ext:ModelField Name="TextContent" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
After click a save button, I try to add breakpoint to get var _M = TestCombo.value However, it appears that if I click save after I changed the selection of the combobox, _M's value will be correct(equals to Tid value), otherwise, _M's value will be the TextContent..
Anyone has idea what caused this issue? Or does anyone have some good samples for Ext.net 2.0+ combobox code (read from remote db)?

Resources