Skip to main content

Has anyone discovered how you can have a custom list of properties when selecting multivalue in smartobjects?


 I have set up a series of service brokers and one of the properties i am trying to use i want to use as multivalue to ensure that the user only has a set list of options.


 The code i have tried is as follows but it does not give me the options when trying to select in a smartobject...


 Code in Service Broker


Property applicationStatusTypeID = Createproperty(SoType.MultiValue, "ApplicationStatusTypeID", "The Application Status Type ID", "The Application Status Type ID");


//add types


applicationStatusTypeID.MetaData.ServiceProperties.Add(

"ApplicationLoaded", 1);
applicationStatusTypeID.MetaData.ServiceProperties.Add("Approval", 2);
applicationStatusTypeID.MetaData.ServiceProperties.Add("ApprovalLetterSent", 3);


 


Output of schema in BrokerManagement


<property name="ApplicationStatusTypeID" type="" sotype="multivalue">




- <metadata>



- <display>



  <displayname>The Application Status Type ID</displayname>


  <description>The Application Status Type ID</description>

  </display>


- <service>



- <key name="ApplicationLoaded">



- <object type="System.Int32">



  <int>1</int>

  </object>

  </key>


- <key name="Approval">



- <object type="System.Int32">



  <int>29</int>

  </object>

  </key>


- <key name="ApprovalLetterSent">



- <object type="System.Int32">



  <int>34</int>

  </object>

  </key>

  </service>

  </metadata>

  </property>

 

I have also tried writing out the xml... (of coarse using a xmlreter) ....

 

Property.MetaData.ServiceProperties.WriteXml(

<Items><Item>This is item 1</Item><Item>This is item 2</Item></Items>)


 


However this gives nothing in the service properties.


 


Has anyone had any success with this?


 


cheers

Be the first to reply!

Reply