This topic contains 1 reply, has 0 voices, and was last updated by markluu 8 years, 3 months ago.

  • Author
    Posts
  • #6212

    lw1

    Hey All,

    I have a dynamically added integer field on a form I’m working on. I would like to disable formatting on this field, much like you can do with standard integer fields, so that, for example, entering 1234 into this field, displays as 1234, and not 1,234.

    Here’s my code for adding the field to the form. I looked in the ss dev/ref guide, but I’m not seeing any API for disabling this formatting.

    var field1 = form.addField(‘custpage_field1’, ‘integer’, ‘Search By Integer Number’, null, ‘main’);

    form.insertField(field1, ‘custevent_search_by_integer’);

    How can I disable the standard formatting applied to integer fields for this dynamically created integer field.

    Much thanks in advance for any helpful answers.
    This is a cached copy. Click here to see the original post.

  • #6213

    markluu

    Hi lw1.

    The formatting of that field should not be affecting the value you receive if you were to retrieve it with the API. For example, you may see 1,234 but if you do nlapiGetFieldValue, it would actually return 1234.

    As for the formatting, I am not aware of any API that would disable the formatting, but the formatting that you see could be dependant on the User Preference or the Company General preferences under the Number Format field.

    If visually you need to see the number as a text format, you could try setting the field as a free-form text.

    Hope this helps,


    david.smith replied on 08/17/2016, 10:09 AM: I would second this response. The formatting is set in preferences.

You must be logged in to reply to this topic.