I am attempting to create a plug-in that will populate a option set field with a value that is in a string field on an entity.
Here's how I think it would happen, just don't know how to approach it:
-Plug-in is fired, via create message;
-Plug-in gets the 'Target' entity, and checks if the string field is populated;
-If the string value is the same as an Option Set value's label, set the option set field value on the target entity;
-Update the target entity with the option set field populated.
I can accomplish all the steps, minus the comparing the string value to existing option set values. I'm not sure how to retrieve all the Option Set data to search through it.