Tech Support > Microsoft Windows > Windows CRM > override Quote Detail Amount
override Quote Detail Amount
Posted by DubSport on February 20th, 2008


I need to override the Amount (baseamount) field on a Quote Detail
page, using javascript. I am able to temporarily change the DataValue
of this field to a new number, but whenever I save the form, it
automatically calculates that field by using the built-in formula of
(Quantity x PricePerUnit). This sucks. How do I over ride it?

Thanks,
....Jamie

Posted by George Doubinski on February 20th, 2008


Hi DubSport,

you can either override priceperunit or, alternatively, add some manual line
discount (which, I believe, could be negative but I may be wrong).

Hope this helps.
--
George Doubinski
CRM Certified Professional - Developer
Blog: http://crm.georged.id.au/


"DubSport" <jamie.carmichael@cmgl.ca> wrote in message
news:59327d4d-ff75-401a-a367-0821290e675c@e10g2000prf.googlegroups.com...


Posted by Amir Allam on February 21st, 2008



had exact same problem, you cant save anything in this field using javascript.
You can either:
1- create a new field that stores whatever calculation you want and then
copy this value to baseamount in OnLoad or OnSave events
2- you can set the value of baseamount using DataValue in OnLoad and OnSave
events so it would appear as the value is saved when the page is loaded.
however it still wouldnt be saved in the database and would only display when
u open the form.
please if any questions reply to me
"DubSport" wrote:

Posted by DubSport on February 21st, 2008


This CRM pricing model really disappoints me. It is not flexible.
My goal was to do some basic "Stepped" product pricing so that I could
accomplish the following:
1st copy: $10,000
2nd copy: $9000
3rd copy: $8100
4th copy: $7300
5th copy: $6600
nth copy: $6000

Basically every next copy you buy is 10% less than the previous copy
(rounded up) up to the 6th copy. After 6 copies all prices are the
same - $6000.

So if a customer wanted 3 copies, they would have to pay: (copy 1
price) + (copy 2 price) + (copy 3 price)

Upon my research I found no way at all to create this type of pricing
method within CRM. It looks like I will have to do it all with a
callout.

I was really hoping that after I did the callout I could simply
override the calculated CRM price that it has put into the "Amount"
field and fill it in with my own data. Apparently CMR won't even let
me do this. CRM is just one frustration after another for me.
Does anyone know of a way to make this easier for me? Maybe someone
knows where the place is to edit the "Pricing Method" formulas so that
I can stop CRM from populating the Amount field with the bogus number?



Posted by George Doubinski on February 22nd, 2008


Hi DubSport,

I don't believe there is a need for callouts at all. I'd use the following
approah (or some variation):

1. Create unit group called Quantity, add units Each and another one called
say Each (>6).
The idea is to "split" your order as you'll see later.

2. Create a percentage based discount list with the following ranges:
2 to 2 - 5%
3 to 3 - 9.66667%
4 to 4 - 14%
5 to 5 - 18%
6 to 6 - 21.66667%
The idea is to give "average" discount rather than per individual copy

3. Create a price list
4. Create a product, say, Book, assign price list above as default, set list
price to 10,000. Set costs as you see fit.
5. Save the product without closing the form and add two price list items:

One with 100% of a list price, unit Each and with discount list set to the
one you created earlier
Another with 60% of a list price, unit Each (>6) and no discount

4. Create new quote/order/invoice. Start adding products:

If total quantity is 6 or less, use Each unit.
If total quantity is > 6 then enter 6 using Each unit and add remaining
books as a separate item using Each (>6) unit

All done! Well, almost... As you can see, we have a nasty problem of
non-rounded amounts for quantities of 3 and 6. Reason is that CRM rounding
policy only applies to price list items and not to the extended amount after
the discount. For one of our customers who insisted on rounding all final
prices to nearest 5c (smallest legal tender in Australia) we renamed manual
discount field's label into "Rounding", adjusted the schema so the field is
not limited to a positive range (for quotedetail, salesorderdetail and
invoicedetail entities). Then added a bit of OnSave javascript that would
insert value into this field so that total is round.

Here you have it.

Hope this help.
--
George Doubinski
CRM Certified Professional - Developer
Blog: http://crm.georged.id.au/


"DubSport" <jamie.carmichael@cmgl.ca> wrote in message
news:82ce99a1-a87a-47cd-af89-ef2a8dc80a17@72g2000hsu.googlegroups.com...


Posted by DubSport on February 22nd, 2008


George, thanks for the help! You got me thinking.

One other little key detail that I forgot to mention was the fact that
the customer may already have purchased 2 copies, therefore with a
new order, they should start at the "Copy 3" pricing.
For this reason alone, any simple model that CRM can provide will not
work. Unless you know of another way for that too! :P
I will have to do a callout, which will be initiated by a button on
the bottom of the form which says "Calculate Discounts". This will
query all other orders for this account and figure the amount of
similar products already ordered by them, and then determine the
discounts from that point on. Once the discounts are determined, I
will pass the value into the "Manual Discounts" field on the quotes
page and voila! Also I think I might do a little report in an iFrame
below showing how we determined that they are eligible for those
discounts.

Does that sound like a reasonable approach, or is there an easier way
yet to do this without having to go custom?


Thanks again!!!
...Jamie

On Feb 22, 1:31*am, "George Doubinski"
<georged.del...@alexanders.remove.net.au> wrote:

Posted by George Doubinski on February 24th, 2008


Hi DubSport,

"little key detail" indeed! What you're asking is, in effect, the pricing
system that takes into account purchase history for the customer. Let me
through small spanners in as well:
- what if you decide later on that only purchases withint last X months
are eligible?
- what if customer returns one of the previous purchases for a refund?
Remember, CRM is not an accounting system, it does not track receivables.

I doubt that there is any CRM system out there that would provide solution
"out of the box". Let me rephrase it: if you point me to the CRM system out
there that has the same number of digits in the license price as Microsoft
CRM and that implements the above requirements out of the box, I'll eat my
license key.

Apart from that I'd say that you're on the right track and the approach
based on custom callouts sounds like the most sensible one.

Hope this helps
--
George Doubinski
CRM Certified Professional - Developer
Blog: http://crm.georged.id.au/


"DubSport" <jamie.carmichael@cmgl.ca> wrote in message
news:f6a236c5-9d50-408a-923f-d598fa39ea23@28g2000hsw.googlegroups.com...
George, thanks for the help! You got me thinking.

One other little key detail that I forgot to mention was the fact that
the customer may already have purchased 2 copies, therefore with a
new order, they should start at the "Copy 3" pricing.
For this reason alone, any simple model that CRM can provide will not
work. Unless you know of another way for that too! :P
I will have to do a callout, which will be initiated by a button on
the bottom of the form which says "Calculate Discounts". This will
query all other orders for this account and figure the amount of
similar products already ordered by them, and then determine the
discounts from that point on. Once the discounts are determined, I
will pass the value into the "Manual Discounts" field on the quotes
page and voila! Also I think I might do a little report in an iFrame
below showing how we determined that they are eligible for those
discounts.

Does that sound like a reasonable approach, or is there an easier way
yet to do this without having to go custom?


Thanks again!!!
....Jamie

On Feb 22, 1:31 am, "George Doubinski"
<georged.del...@alexanders.remove.net.au> wrote: