locked
Dynamics CRM Invoice Product Tax RRS feed

  • Question

  • I am trying to register a plugin to auto-calculate sales tax. I have followed the body mass index lab in the sdk as well as the Auto Number code examples. I am able to set the tax value in a Pre-Operation registration by using:

     

    Money tax = new Money(10);
    entity["tax"] = tax;

     

    However, I am unable to grab quantity or baseamount values by using:

     

    Money baseamount = (Money)entity["baseamount"];

    That gives me the following error "Given key not present in the dictionary" in both Pre and Post-Operation.

    How do I successfully retrieve the baseamount and set the tax amount?

     

     

    Friday, July 22, 2011 5:32 PM

All replies

  • Hi,

    Please check out below thread for more help.

    http://social.microsoft.com/Forums/en-ZW/crmdevelopment/thread/1e69c03e-7437-4c9d-b272-22b7fc7a5811

     

     


    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html
    Saturday, July 23, 2011 10:16 AM
  • If you are registering this on create message. You won't get this value as system automatically retrive this value. This value is not passed to the context.

     But you can get the id of  the record in postcreate event and you can use that to retrive the entity values and update the record.

     

    I HOPE THIS HELP

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    Saturday, July 23, 2011 1:21 PM