Hi Community,
I was wondering if it is possible to sum two option set fields in CRM without having to use javascript?
For example i have option set A with a value of 1, option set B with a value of 3, id like to add the two values and then store the total in a separate field.
Many Thanks in advance.
*This post is locked for comments
If the fiueld you want to set the value is String. Use this code:
var value1 = Xrm.Page.getAttribute("OptionsetAFieldName").getValue();
var value2 = Xrm.Page.getAttribute("OptionsetBFieldName").getValue();
var sum = value1 + value2;
Xrm.Page.getAttribute("FieldNametoSet").setValue(sum.toString());
Hi Andrii,
thank you for your reply
Could you point me in the right direction please of some examples if possible.
Many Thanks.
Hello,
I don't think that's possible. You will have to write couple of JavaScript code lines.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156