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

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: how to implement EMI calculator plugin?Any suggestions?

    Great !! Good Job Sir.

  • bharrath Profile Picture
    195 on at
    RE: how to implement EMI calculator plugin?Any suggestions?

    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);

    }

  • bharrath Profile Picture
    195 on at
    RE: how to implement EMI calculator plugin?Any suggestions?

    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.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: how to implement EMI calculator plugin?Any suggestions?

    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans