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)

Calculate currency field on opportunities.

(0) ShareShare
ReportReport
Posted on by

We have a opportunity where the sales team fill inn value for estimated sale for product groups. For example an oportunity have a value for productgroup A, productgroup B. (but there is no value filled in for productgroup C and D). When I create a calculated field, and try do calculate the value of all the product groups, the value of the calculated field gives no value. But if i type 0 in productgroup C and D, the calculation is ok. Must alle the fields contain a value? If yes, how is the easiest way to set a default value to 0 for a currency field ?

*This post is locked for comments

I have the same question (0)
  • Luke Sartain Profile Picture
    1,266 on at

    Hi HenS

    How are you performing the calculations? Business Rules, JavaScript or Plugin perhaps?  The quickest solution may be to use Business Rules to set the product group fields to 0 when the record is initially created.  Alternatively you may wish to use Javascript to check if a value exists before performing the sum calculation.  For example:

    var productgroupA = 0; 

    if (Xrm.Page.getAttribute("new_productgroupA").getValue()){

    productgroupA = Xrm.Page.getAttribute("new_productgroupA").getValue();

    }

    var total = productgroupA + productgroupB;

    Hope that helps.

  • Verified answer
    ManirajKV Profile Picture
    1,477 on at

    Hi Hens,

    Use business rule for default it to '0'. That's the best way.

    like this screenshot.34552.Untitled.png

  • HenS Profile Picture
    on at

    Hi. That works for us. Thanks :-)

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