locked
Decimal value out of range - Record unavailable errors when creating a new quote from within an opportunity RRS feed

  • Question

  • Hi All,

    I am trying to create a new quote from within an opportunity but I get the errors mentioned in the title. When i set the 'manualdiscountamount' on the quoteproduct entity to match the opportunityproduct entity i got the 'Record unavailable' error.

    The manualdiscountamount was modified to allow negative numbers. When creating a quote from an opportunity where the line items do not have a negative 'manualdiscountamount' it works fine, no errors. however, if one of the products has a negative 'manualdiscountamount' i originally got the 'decimal value out of range' error, before i matched the max and min values for 'manualdiscountamount' on both opportunityproduct and quoteproductentities.

    Can anyone explain why i get the 'record unavailable' error now? or have i missed a step out?

    Thanks for your time! :-)
    Tuesday, October 27, 2009 11:50 AM

Answers

  • Hi,

    the values of the attribute 'manualdiscountamount' of all quoteproducts are summed up in the field 'totaldiscountamount' in the quote.
    This field has a lower bound of '0', which is not adjustable. This leads to a validation error, which should produce your error.

    You can verify this, if you enable the tracing on the crm server (See http://support.microsoft.com/kb/907490 ). In the trace log you should find a validation error.
    Tuesday, November 3, 2009 4:07 PM

All replies

  • Hi,

    the values of the attribute 'manualdiscountamount' of all quoteproducts are summed up in the field 'totaldiscountamount' in the quote.
    This field has a lower bound of '0', which is not adjustable. This leads to a validation error, which should produce your error.

    You can verify this, if you enable the tracing on the crm server (See http://support.microsoft.com/kb/907490 ). In the trace log you should find a validation error.
    Tuesday, November 3, 2009 4:07 PM
  • I don't understand why you allowed negative numbers in the 'manualdiscountamount' field, since the field itself represents an amount to be subtracted from the total.  The 'extendedamount' value of a Quote or Order is allowed to be negative, and can only be achieved by using the 'manualdiscountamount' fields.  You place a positive number in the 'manualdiscountamount' which is greater than the 'totalamount', and the 'extendedamount' will come out negative.

    Placing a negative number in the 'manualdiscountamount' is practically adding value to the 'totalamount'.  The simplest way to achieve that, is to override the price and simply add the amount you wish to the unit price (or provide a custom field for the additional value, and calculate the addition of the custom field to the total amount in a plugin which operates before the system code that calculates the extended amount).
    Dave Berry
    Tuesday, November 3, 2009 5:47 PM
    Moderator
  • Hi,

    thanks for your answer, it was 99.9% there...there is also one other field that needed it's min value changing and that was 'totallineitemdiscountamount'...i set up tracing on the server and this popped up! thank you so much!!!
    Tuesday, November 10, 2009 10:27 AM