Perform a Mileage Expense Calculation Using EasyPlugins
We’ve recently deployed a few custom plugins based on the EasyPlugins tool for Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM 2015, available for free on CodePlex. In this blog we’d like to share some of the things we’ve learned, since the tool is great but not very well documented. In this blog we’ll review how to calculate an expense mileage reimbursement amount. There are other ways to do this, but this way allows for business users to manage reimbursement rates and effective dates. I’m also making it it slightly complex because I want to demonstrate some of the things that aren’t covered in the official documentation. In my example, I have: An entity called ics_expense that contains: A date (ics_date) that, by business requirement, the user must be able to leave blank. If they do, the date will default to today. The per-mile rate that was applied (ics_permilerate), a Currency value. A distance value (ics_distance) as a Decimal value. An Amount value (ics_amount), also a Cur...