locked
product as a % of list price, crm 4.0 RRS feed

  • Question

  •  

    I have created a product 'annual support contract', i have a standard price list for all products, a standard primary unit, a pricing method= percent of unit, percentage = 17.50. rounding policy = none, quantity selling option = no control. when I create a quote , I have an error = an error occurred during pricing of a detail line item .In the quote the 'annual support contract'  has a blank in price per item , quantity = 1 . and a blank in extended amount.

    My plan was to have an annual support contract that was a 17.5 % of the total value of the products listed in the quote . is this possible and if so do you know where i am going wrong ?

     

    regrds

     

    bethan

    Saturday, May 10, 2008 10:03 AM

Answers

  •  

    OK, here are more detailed instructions.  I'm assuming that you have a basic understanding of Microsoft CRM customization.  I would recommend that you get a copy of Working with Microsoft CRM by Sanoma Partners

     

    1. Add a new attribute to the quote called support.  Make it a money type attribute

    2. add the new attribute to the form

    3. while you are still on the form customization for the quote form, click form properties

    4. On the Events tab, click "On save" and click "edit"

    5. paste the following into the big text box:crmForm.all.new_support.DataValue = crmForm.all.totalamountlessfreight.DataValue * .175

    (note--my previous post did not include the schema prefix in front of the field name.  If you use a different prefix instead of the standard "new_", just replace it in the code.

     

    6.  Don't forget to check the checkbox at the top of the form to enable the customization.

    7.  Save the form.

    8.  Publish the Quote entity

     

    to test, add some products to a quote and hit save on the quote record.  The support field will now be 17.5% of the total value before freight and tax.

     

    If that is still above your head, I would encourage you to read the Working with Microsoft CRM book, and familiarize yourself with basic javascript.

    Saturday, May 10, 2008 2:58 PM
    Moderator

All replies

  • since your support contract is a % of the price of all of the items on the quote, consider doing it on the quote record rather than as a product, since all of the products are summed on the quote.

     

    If you have a standard support % of 17.5%, you could add a field called support and do an on-save javascript something like this:

    crmForm.all.support.DataValue = crmForm.all.totalamountlessfreight.DataValue * .175

     

    This would do 17.5% * the pre freight and tax total of the quote.

     

    If the percentage veries, you could create another attribute called support percentage, and then your javascript would be

    crmForm.all.support.DataValue = crmForm.all.totalamountlessfreight.DataValue * crmForm.all.supportpercentage.DataValue

     

    I would do it on save of the quote so that it would recalculate every time that the quote is updated. 

     

    Saturday, May 10, 2008 11:01 AM
    Moderator
  • Dear Joel

    This sounds very useful information. but I'm afraid it is above my head. If you could provide very basic instructions that would be great but if not - then it is no problem . thank you . Bethan

    Saturday, May 10, 2008 2:16 PM
  •  

    OK, here are more detailed instructions.  I'm assuming that you have a basic understanding of Microsoft CRM customization.  I would recommend that you get a copy of Working with Microsoft CRM by Sanoma Partners

     

    1. Add a new attribute to the quote called support.  Make it a money type attribute

    2. add the new attribute to the form

    3. while you are still on the form customization for the quote form, click form properties

    4. On the Events tab, click "On save" and click "edit"

    5. paste the following into the big text box:crmForm.all.new_support.DataValue = crmForm.all.totalamountlessfreight.DataValue * .175

    (note--my previous post did not include the schema prefix in front of the field name.  If you use a different prefix instead of the standard "new_", just replace it in the code.

     

    6.  Don't forget to check the checkbox at the top of the form to enable the customization.

    7.  Save the form.

    8.  Publish the Quote entity

     

    to test, add some products to a quote and hit save on the quote record.  The support field will now be 17.5% of the total value before freight and tax.

     

    If that is still above your head, I would encourage you to read the Working with Microsoft CRM book, and familiarize yourself with basic javascript.

    Saturday, May 10, 2008 2:58 PM
    Moderator
  • many thanks Joel

    Saturday, May 10, 2008 11:36 PM
  • Hi Joel,

    Thank you very much for this solution as it is exactly what I was looking for.  But, unless I am missing something, the amount for the support is not added to the total of the quote.

    I have tried using javascript to add the value to the total, but this is failing.
    I then tried setting the Quote Discount Amount value to the support value, this then results in it being included in the total (obviously being subtracted rather added - not ideal ;) )

    Would you happen to know where the calculations for these fields are stored?

    Or if you have any other ideas.

    Many thanks

    Pierre Joubert
    Wednesday, March 10, 2010 11:41 AM