web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to implement EMI calculator plugin?Any suggestions?

(0) ShareShare
ReportReport
Posted on by 195

1307.emi2.png

Hi friends am trying to implement EMI calculator.Can anyone give suggestions?thank you.

Here’s the formula to calculate EMI:

EMI Formula

 

 

 

where

E is EMI

P is Principal Loan Amount

r is rate of interest calculated on monthly basis. (i.e., r = Rate of Annual interest/12/100. If rate of interest is 10.5% per annum, then r = 10.5/12/100=0.00875)

n is loan term / tenure / duration in number of months

For example, if you borrow ?10,00,000 from the bank at 10.5% annual interest for a period of 10 years (i.e., 120 months), then EMI = ?10,00,000 * 0.00875 * (1 + 0.00875)120 / ((1 + 0.00875)120 â€“ 1) = ?13,493. i.e., you will have to pay ?13,493 for 120 months to repay the entire loan amount. The total amount payable will be ?13,493 * 120 = ?16,19,220 that includes ?6,19,220 as interest toward the loan.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    Is there any reason you are doing calculation in plugin ? As plugin is server side and you can not get directly the return to client side . So you have to reload the forms to see the results. However in that case you just need to use entity referene of posted entity context  to get the value of fields and do the calculations. Here is the c# reference  after getting those values you just need to replace the field values.

    [View:http://www.authorcode.com/how-to-make-emi-calculator-using-c/]

    I would recommend  to implement this in client side onchange event of fields so that you can see the result instantly.Here is one reference using jquery.

    [View:http://ngiriraj.com/pages/finance/emi.php]

    Hope this helps.

  • bharrath Profile Picture
    195 on at

    Hi Goutam, No specific reason using plugin.I got how to do using javascript but I didn't find any code using plugin.So I want to take help from you people.Thank you very much.

  • bharrath Profile Picture
    195 on at

    Thank you Goutam its working.my code

    //I called this function on load to disable monthlyemi field.

    function disable()

    {

    Xrm.Page.getControl("hdfc_monthlyemi").setDisabled(true);

    }

    // I called this function on save

    function EMI()

    {

    var loanamount =  Xrm.Page.getAttribute("hdfc_loanamount").getValue();

    var interest =  Xrm.Page.getAttribute("hdfc_interestrate").getValue();

    var monthlyInterestRatio = (interest/100)/12;

    var term =  Xrm.Page.getAttribute("hdfc_loanterm").getValue();

    var top = Math.pow((1+monthlyInterestRatio),term);

    var bottom = top -1;

    var sp = top / bottom;

    var emi = ((loanamount * monthlyInterestRatio) * sp);

    var res=emi.toLocaleString();

    Xrm.Page.getAttribute("hdfc_monthlyemi").setValue(res);

    }

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Great !! Good Job Sir.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans