Remove thousand separator for just 1 field

i have a Integer field in a list - is there a way of removing the thousand separator comma from just this 1 field?

  • 0

    Get the field name from the page code. If the field is called case_c_test then the data value displayed in view mode is in _Datacase_c_test and you also need to find the view mode action number from the URL. In the code below, this code fires on the case detail screen unless it is in edit mode. There could easily be a better way to do it but I couldn't see a way with the clientside API. You could probably use jQuery instead of raw javascript to get around browser incompatibilities, but my jQuery knowledge is next to non-existent.

    You could extend this to apply to a list but you'll need to figure a place to put the code and iterate the list

    <script>
    crm.ready(function(){
    if(crm.getArg("Act",crm.url())!='284')
    {
    var s = document.getElementById('_Datacase_c_test').innerText.replace(/,/g, '');
    document.getElementById('_Datacase_c_test').innerText = s;
    }
    });
    </script>