locked
Optionset value RRS feed

  • Question

  • Hi can somebody explain me again why an optionset value within a solution is generated by the system automatically?

    Should an optionsetvalue contain a unique number accross the entire solution?

    Regards,

    Boudewijn

    Tuesday, March 20, 2012 1:24 PM

Answers

  • The value doesn't exactly need to be unique. The combination of the ObjectTypeCode (entity), AttributeName (field name), AttributeValue (option value), LangId (language), and OrganizationId make the the specific optionset item unique in the database. I'm thinking it is automatically created to deter you from trying to enter the same value twice when creating optionset items because you can attempt to violate this constraint.  You should get a warning before being able to save the item if you try and reuse the same value in the same optionset. 

    Jason Lattimer

    Tuesday, March 20, 2012 5:36 PM
    Moderator
  • The optionset value is generated automatically as a key off of your publisher/customization prefix.  This is used to help prevent different solution publishers from overwriting each other's option set values.  The value only needs to be unique for that single option set.

    Thanks,

    Brandon

    Wednesday, March 21, 2012 6:36 PM

All replies

  • The value doesn't exactly need to be unique. The combination of the ObjectTypeCode (entity), AttributeName (field name), AttributeValue (option value), LangId (language), and OrganizationId make the the specific optionset item unique in the database. I'm thinking it is automatically created to deter you from trying to enter the same value twice when creating optionset items because you can attempt to violate this constraint.  You should get a warning before being able to save the item if you try and reuse the same value in the same optionset. 

    Jason Lattimer

    Tuesday, March 20, 2012 5:36 PM
    Moderator
  • The optionset value is generated automatically as a key off of your publisher/customization prefix.  This is used to help prevent different solution publishers from overwriting each other's option set values.  The value only needs to be unique for that single option set.

    Thanks,

    Brandon

    Wednesday, March 21, 2012 6:36 PM