locked
How to Order Options during the Creation of Boolean Attribute via SDK RRS feed

  • Question

  • When we create the BooleanAttributeMetadata through SDK by executing CreateAttributeRequest, we can only set the TrueOption and FalseOption of the BooleanOptionSetMetadata.

    But the ordering of the options cannot be set during the creation through SDK and the attribute is created in TrueOption as the first option which is reversed from the default order of creating Two Options attribute in CRM web.

    So far, the only alternative solution that I know is to call OrderOptionRequest to order in reverse after executing CreateAttributeRequest. (but for my application, I am having an issue to make a subsequent call due to some limitations)

    So, I am wondering how the CRM web application handle at the backend for the creation of Two Options if SDK doesn't allow that. Or is there any order setting that I don't know or any other workaround solution to make only one web service call.

    Wednesday, September 9, 2015 3:14 AM

All replies


  •  (but for my application, I am having an issue to make a subsequent call due to some limitations)

    which is this issue? which are these limitations?

    My blog: www.crmanswers.net - CRM Theme Generator

    Wednesday, September 9, 2015 8:33 AM

  • which is this issue? which are these limitations?
    Hi Guido Preite,

    Thanks for your response. I figured out the issue in my code that I was calling OrderOptionRequest with the same schema name provided from the file (which contains mixed case) without converting to all lower case. That's why I was getting the following error when I called OrderOptionRequest after executing CreateAttributeRequest.
    Could not find an attribute with specified name:  new_TestBooleanAttribute

    Now, that issue has been resolved so that there's no more limitation.

    But I'm still wondering if the CRM web application handle the same way at the backend if we create Two Options attribute from web.

    • Edited by Linn Zaw Win Thursday, September 10, 2015 2:22 AM
    Thursday, September 10, 2015 2:22 AM