Topic by Alanna Larson
Content
I have a menu-type custom field in an incident and given the name of the field and an ID I need to get the string menu value (via a desktop add-in).
For example:
Name: CustomMenu
Menu Items:
Default (ID: 40)
Alternate (ID: 41)
Given the name, CustomMenu, and an ID of 41, I want to retrieve the name "Alternate".
I am able to retrieve a partial version of the custom field. I use _globalContext.GetOptlist((int)RightNow.AddIns.Common.OptListID.CustomFields) to retrieve a list of the custom fields, find the one with the correct name (say CustomMenu), and then I can check if my given ID (say 41. this ID is set by the agent) exists for that custom field with CfId and ValInt. However, I can't retrieve the string name (the ValStr, where I hoped this value would be, is empty).
Is there a way to retrieve the name from the incident context / global context available to me in a workspace add-in?
Otherwise, can I retrieve it through SOAP? I'm attempting to do so currently but I'm having trouble understanding how to apply the Generic Field structure. I was able to find similar tasks in the SOAP documentation (getting a custom object, setting a string-type custom field, etc.) but they are different enough that I don't understand how to apply them to my situation. Is there example code anywhere of this particular task?
(I apologize for the lack of links, due to the documentation using frames... this is the root page)