locked
MS CRM 2011 - Order product RRS feed

  • Question

  • Hi, problems with taxes again.

    In the order product form, there is a tax field where I can put a value for tax. Now I want to add that value from formula (amount * tax percentage = tax). The problem is that amount is calculated after the form is saved.

    What would be the best solution to do that. And of course, the tax should be included then to extended amount.

    I thought something like this:

    form is saved -> get amount -> use formula -> set tax field

    I didn't get that to work.

    Friday, July 19, 2013 11:30 AM

Answers

  • Hi,

    As I mentioned in your previous question. You could do this requirement partially through a JavaScript. The initial trigger could not be set on the change of the fields, because if there is a new product form it calculates 0! The probable issues you may have on the JavaScript for this purpose:

    1- Some of the fields are calculated fields, so you could not capture them. Because they are calculated after the save event of the JavaScript.

    2- Although you could retrieve values by yourself from the price per unit, quantity and manual discount field to overcome the mentioned issues, but the Volume Discount field could not be retrieved even with this method.

    To overcome this problem, you could use a plugin instead not a JavaScript function, as I told you before! :)



    My Weblog | My Website

    Friday, July 19, 2013 12:38 PM
    Moderator

All replies

  • you can use javascript to perform the calculation

    fire the script on change event of the field.


    ms crm

    Friday, July 19, 2013 11:44 AM
  • you can use javascript to perform the calculation

    fire the script on change event of the field.


    ms crm

    DO you think that will work? I mean, if I save & close the form, the extended amount will go to the product form, so will the calculation be finished and the correct extended amount will be inherited to order form. And of course the tax value, it must be inherited too to order form.

    But I have to test your solution.

    Friday, July 19, 2013 11:55 AM
  • sorry i dnt understand ur question completely 

    you cannot fire the script after the save operation

    for this you need to go for the plug-in, post-operation

    or you need to fire the script on save of the form.


    ms crm

    Friday, July 19, 2013 12:23 PM
  • Hi,

    As I mentioned in your previous question. You could do this requirement partially through a JavaScript. The initial trigger could not be set on the change of the fields, because if there is a new product form it calculates 0! The probable issues you may have on the JavaScript for this purpose:

    1- Some of the fields are calculated fields, so you could not capture them. Because they are calculated after the save event of the JavaScript.

    2- Although you could retrieve values by yourself from the price per unit, quantity and manual discount field to overcome the mentioned issues, but the Volume Discount field could not be retrieved even with this method.

    To overcome this problem, you could use a plugin instead not a JavaScript function, as I told you before! :)



    My Weblog | My Website

    Friday, July 19, 2013 12:38 PM
    Moderator
  • Hi,

    As I mentioned in your previous question. You could do this requirement partially through a JavaScript. The initial trigger could not be set on the change of the fields, because if there is a new product form it calculates 0! The probable issues you may have on the JavaScript for this purpose:

    1- Some of the fields are calculated fields, so you could not capture them. Because they are calculated after the save event of the JavaScript.

    2- Although you could retrieve values by yourself from the price per unit, quantity and manual discount field to overcome the mentioned issues, but the Volume Discount field could not be retrieved even with this method.

    To overcome this problem, you could use a plugin instead not a JavaScript function, as I told you before! :)



    My Weblog | My Website

    Yep, I thought I can do it this way, but I think now I am wrong. Thanks anyway :).
    Friday, July 19, 2013 4:14 PM