Is there a way to update Money fields by a percentage? #177
-
I am trying to implement a price increase across all Price Lists. The "Update Price" is new in D365 and works against Price List Item, but I then use Discount Lists for user banding. I can update the Price List Item by +5%, but then also need to update the Discount List by +5% to make it work correctly. I've got the correct records in bulk updater but wondered whether the Calculate Function could be used to +5% to the amount and amount_base columns? Something like: ({amount} * 1.05) - but I just get Error: Not valid Money Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
A tiny more than that you wrote... Try this: First the See docs with a bit more info: https://jonasr.app/xrm-tokens/#formatting |
Beta Was this translation helpful? Give feedback.
-
Awesome! Many thanks for that. Is there any way to round the result to 2 decimal places? So, 7.33 * 1.05 results in 7.696500 but I want it to round to 7.700000 and 8.431500 should round to 8.430000. Many thanks. |
Beta Was this translation helpful? Give feedback.
-
UPDATE: @rappen - the 1,05 actually multiplies it by 105. Use 1.05 to increase by 5%. |
Beta Was this translation helpful? Give feedback.
A tiny more than that you wrote...
Try this:
{amount|<value><Math|*|1,05>}
First the
<value>
to get only the value, not with "kr", "USD" or whatever.Then you have to say that you want to use
Math
.Then add *
Finally add what you multiply with.
See docs with a bit more info: https://jonasr.app/xrm-tokens/#formatting