I have tried using the below suggestion :https://stackoverflow.com/questions/30161583/crm-2013-to-remove-comma-from-whole-number-field but the onchange event is not working. kindly let me know if there are any other options
*This post is locked for comments
Hi Divya,
Check with different different browsers.
Sometimes may be browser issue.
Thanks
Hi Divya,
I think this is only the supported approach by which you can do this.
Here is some step you can also follow below steps .
> let's say you have two field new_wholenumber and new_text in your form
> Make display none by double clicking the field new_wholenumber.
> Register below function on change of the text field which enable to any change in the text to assign to the whole Number.
function OnchangeTextField(){
var stringValue = Xrm.Page.getAttribute("new_text").getValue();
Xrm.Page.getAttribute("new_wholenumber").setValue(stringValue);
}
> Dynamics 365 support onkeypress so using this method you can Restrict only numbers in the new_text field.
Here is the reference you need to just add the function on the onload method.
mahadeomatre.blogspot.in/.../keypress-methods-in-ms-crm-2016.html
Hope this helps
Hi,
Are you using the text field approach? So copying the value from the number field to the text field and back?
If so could you post your code? Also make sure you register the on change event in the form attribute and publish the changes.
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
52
Victor Onyebuchi
6