Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Is this a bug? writing price of product to custom entity

(0) ShareShare
ReportReport
Posted on by 20

I have a need to do something very simple:  use a calculated field to read the retail price ("price") of a product and multiply is by a percentage.

So I've set up the N:1 relationship between my custom entity and the product entity, selected the required product and now I'm working on a calculated field to take the product price from the list price of the product, multiply it by 0.9 and display it in a field.

Everything I have read says that if I use this "new_membershiplevel.price * 0.5" in the calculated field then the list price of the product will be multiplied by 50% and the value placed in this currency field.

I can't see any errors anywhere and this is something I have done successfully before, so is this a bug, or have I made a mistake?

Thanks,

Simon7357.Window.png

*This post is locked for comments

  • Suggested answer
    Nettsales Profile Picture
    20 on at
    RE: Is this a bug? writing price of product to custom entity

    I'm ebarassed to say I've found the answer to this issue!  In case anyone else hits the same issue, the problem was that I didn't have the currency field on the form.  As it is a custom entity, the currency field is not added by default and it appears that for any calcuation to work on a currency type field, the currency needs to be set.  Which makes sense, I guess.

  • Nettsales Profile Picture
    20 on at
    RE: Is this a bug? writing price of product to custom entity

    Ahhh sorry - probably a good idea!  

    Problem is that there is nothing coming through into the calculated field in the custom entity.  This is regardless of whether I just push the contents of the "list price" field or put a calculation on it.

    I need to use the list price as this is being updated from the Sage accounts system, so price lists are not really an option.

  • Martin Donnelly Profile Picture
    1,028 on at
    RE: Is this a bug? writing price of product to custom entity

    I think it's more conventional to use a price list to execute this strategy but, what is the problem?  You've shown the configuration but not mentioned what's wrong.

    ps- on the SDK side, such an operation would require one to execute currency.Value (money to decimal) before doing any math and then converting it back: new Money(price.Value*0.5)

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,281 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,019 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans