locked
Decimal Place on Quantity field in Order Product form RRS feed

  • Question

  • Hi All,

    How to set the quantity field to no decimal places? I had change the field precision to 0, but after tab off the field, there is 5 decimal places display.

    Thanks.

    Regard,

    Teh

    Friday, September 23, 2011 7:49 PM

Answers

  • Hi,

     

    If you do not want the quantity field to display decimal places – this means that you are only selling “whole” units (as opposed to partial/fractional units, or a combination thereof).

     

    The setting which controls this is defined against the “Price List Item” records for a Product.

    There is a field called “Quantity Selling Option” – if you only want to sell whole units, you must have this set to “Whole” against all of the Price List Items for a Product.

     

    If you’ve updated this field as above, against an Order Product, if a user enters a fractional amount (eg. 0.5, 1.5) this will be rounded up to the next “whole” unit.

     

    This should fix it for you.

     

    Thanks,

    Maryse


    The xRM Architect:
    • Proposed as answer by - Maryse - Saturday, September 24, 2011 1:47 PM
    • Marked as answer by Teh Monday, September 26, 2011 4:01 PM
    Saturday, September 24, 2011 1:46 PM

All replies

  • After you change the precision, hav you published the customizations?


    Gonzalo | gonzaloruizcrm.blogspot.com

    • Proposed as answer by Jehanzeb.Javeed Saturday, September 24, 2011 1:47 PM
    Friday, September 23, 2011 7:50 PM
    Moderator
  • Hi,

     

    If you do not want the quantity field to display decimal places – this means that you are only selling “whole” units (as opposed to partial/fractional units, or a combination thereof).

     

    The setting which controls this is defined against the “Price List Item” records for a Product.

    There is a field called “Quantity Selling Option” – if you only want to sell whole units, you must have this set to “Whole” against all of the Price List Items for a Product.

     

    If you’ve updated this field as above, against an Order Product, if a user enters a fractional amount (eg. 0.5, 1.5) this will be rounded up to the next “whole” unit.

     

    This should fix it for you.

     

    Thanks,

    Maryse


    The xRM Architect:
    • Proposed as answer by - Maryse - Saturday, September 24, 2011 1:47 PM
    • Marked as answer by Teh Monday, September 26, 2011 4:01 PM
    Saturday, September 24, 2011 1:46 PM
  • Changing the precision only change the decimal places on the views not on the form. I think its a bug on system decimal attibutes.

    I think you should create a custom quantity field of crm number data type. Add this field on the form  and on change this custom field update the system quantity field.

    Also hide the system quantity field using javascript.

    I hope this helps.

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Proposed as answer by Amreek Singh Saturday, September 24, 2011 2:08 PM
    Saturday, September 24, 2011 2:08 PM
  • After you change the precision, hav you published the customizations?


    Gonzalo | gonzaloruizcrm.blogspot.com

    Change the precision is not working. however, Maryse suggestion is working. Thanks
    Monday, September 26, 2011 4:02 PM
  • Hi,

     

    If you do not want the quantity field to display decimal places – this means that you are only selling “whole” units (as opposed to partial/fractional units, or a combination thereof).

     

    The setting which controls this is defined against the “Price List Item” records for a Product.

    There is a field called “Quantity Selling Option” – if you only want to sell whole units, you must have this set to “Whole” against all of the Price List Items for a Product.

     

    If you’ve updated this field as above, against an Order Product, if a user enters a fractional amount (eg. 0.5, 1.5) this will be rounded up to the next “whole” unit.

     

    This should fix it for you.

     

    Thanks,

    Maryse


    The xRM Architect:
    Thanks. It working now.
    Monday, September 26, 2011 4:02 PM
  • Changing the precision only change the decimal places on the views not on the form. I think its a bug on system decimal attibutes.

    I think you should create a custom quantity field of crm number data type. Add this field on the form  and on change this custom field update the system quantity field.

    Also hide the system quantity field using javascript.

    I hope this helps.

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    It is working with Maryse suggestion. Thanks.
    Monday, September 26, 2011 4:02 PM
  • Hi

    Even if you've change the  Quantity Selling Option to whole,

    the problem does still exist.

    Any clues?

    Thanks

    Thursday, December 13, 2012 12:39 PM
  • Use the follow javascript code to 'hide' the decimal numbers

    document.getElementById("quantity").acc = 0;
    var q = Xrm.Page.getAttribute("quantity");
    q.setValue(q.getValue());

    This is unsupported but does the trick.
    Friday, June 28, 2013 8:16 AM
  • Use the follow javascript code to 'hide' the decimal numbers

    document.getElementById("quantity").acc = 0;
    var q = Xrm.Page.getAttribute("quantity");
    q.setValue(q.getValue());

    This is unsupported but does the trick.

    Thanks for your suggestion.

    I tried this and at first it seemed to work when I tabbed into another field.

    But then I clicked save and nothing happened.

    Could not save.

    X-ed the screen and got the famous Microsoft error (send report option).

    Seems like there's something in the code or that I'm on CRM 2011 online RU 15/16?

    Thursday, August 28, 2014 2:25 PM