AdvancedSymbology Message value reverts back to default

505
1
05-17-2013 06:20 AM
Labels (1)
MatthewSerbinski
New Contributor
I am adding a custom designation to the AdvancedSymbology Message to keep track when a message is Selected. It appears that the value I set on the message reverts back to the original value when I pull that message out of the message layer. Here is the sudo code:

Create a new message and add the custom designation:
            message.Add("IsSelected", "false");

Pull the message from the message layer, set the custom designation to true and process the message:
            selectedMessage = messageLayer.GetMessage(message.Id);
            selectedMessage["IsSelected"] = "true";
            messageLayer.ProcessMessage(selectedMessage);

Check the value of the custom designation:
            if (selectedMessage["IsSelected"] == "true")



At the last step the value is always the default value (in this case false). Is there a better way to know when a message is selected or not?
0 Kudos
1 Reply
MatthewSerbinski
New Contributor
I still do not know why the value on the message is not taking when it is set and processed, but I have figured out that you can use the following code to know when a message is selected or not:

bool isSelected = messageLayer.GetMessageIsSelected(selectMessage.Id);
0 Kudos