Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Inserting Values to Custom Menu field through Add-in (15 Comments)

$
0
0

Topic by Aswani PV

Hi all,

My requirement is to add values into a custom menu field through add-in (using C#) . I only know the id for the created custom field(it is 21). We can use ICFVal to set or get values in an ordinary field like textbox , but my question is how can I insert values in to a menu custom field using its id . Is there any way to add the value using add-in. Please help its urgent. Any help will be appreciated. I am using Visual Studio Express 11.0 for creating add-in. The below code gives me the integer id of the custom menu field value that are added directly from Rightnow CX. Now I want to add values through program.

IIncident inc = null;
                       inc = IIncident)RecordContext.GetWorkspaceRecord(RightNow.AddIns.Common.WorkspaceRecordType.Incident);
            IList<ICfVal> incidentcf = inc.CustomField;
            foreach (ICfVal value in incidentcf)
            {
                if (value.CfId == 21)
                { 
 
                    int item = (int)value.ValInt;
                    MessageBox.Show("item:" + item);   
                }
            }
 

Thanks,

Aswani


Viewing all articles
Browse latest Browse all 2504

Trending Articles