2

I'm using Dynamics CRM 2015 Online Update 1, trying to edit the XML of a chart containing the StatusCode of States, so I can change the order of the StatusCodes.

The States are Open, Won, & Lost. Each of these States have StatusCodes as a sort of option set, but it's an out of the box option set that does not allow me to edit the values manually. I can add or remove Statuscodes, or rename them, but the value field is read-only.

The only ways I can find to sort this data on the chart are via the Status Name or the value of the Status. Unfortunately, the values are not in the order I need, and I cannot edit the values because this isn't a custom option set.

If the States or StatusCodes were part of a custom entity, I could add a sort order field and sort by that.
If the StatusCode value wasn't read-only, I could edit those values and sort by that.

If I append a number to the front of the Status Name I could sort by that, but it's an unappealing option.

Is there any alternative method by which I could set the order of these StatusCodes, or should I try a completely different approach?

The screenshot below shows the current order, with numbers appended to the name. The numbers are the order I'm trying to use (just for reference), but I'd like to remove the numbers from the name.

Option Set Sort Order Issue

Jon Crowell
  • 21,695
  • 14
  • 89
  • 110
JHill
  • 21
  • 1
  • couldn't you add a global option set to the form and use that one instead of the existing one? – Luca Nov 11 '15 at 21:14
  • There's an ugly-ish solution and that is to have a workflow or plugin update a text field to something you want it to be sorted on. You'll have to update legacy data though – Rickard N Nov 12 '15 at 10:45
  • 1
    Can you not simply change the label for each value? So that the lowest value contains "awarded" and the highest value contains "on hold"? Otherwise I think adding a custom optionset with the values in the correct order and setting it with a plugin to the same as the statuscode. You don't have to put this field visible on the form but you can use it to do the sorting for your chart. – el shorty Nov 13 '15 at 12:41
  • 1
    Thanks for the answers, guys. I ended up using el shorty's 2nd suggestion, with the custom option set and hidden field on the form. el shorty, if you'd like to copy your comment into an answer, I'll be happy to mark it as the answer to this question. – JHill Nov 16 '15 at 16:14

0 Answers0