You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Set Incident Custom Field Value via Incident Workspace AddIn

Accepted answer
15
Views
2
Comments
edited Apr 23, 2016 2:23PM in UI Extensibility 2 comments

Content

Hi All, 

I am trying to set an incident custom field (boolean type) value via incident workspace without refresh or save 

 

However, no luck. Does someone know a way to do that? 

 

Thank you 

Code Snippet

              //To set the send_request_mail custom field to yes 
            IIncident inc = ircomp.GetWorkspaceRecord(RightNow.AddIns.Common.WorkspaceRecordType.Incident) as IIncident;
            // get the list of CustomFields
 
            IList<ICfVal> c_inc_field = inc.CustomField;
            foreach (ICfVal cv3 in c_inc_field)
            {
                if (cv3.CfId == 31)
                {
                    cv3.ValInt = 1;
                    break;
                }
            }
    
            ircomp.ExecuteEditorCommand(RightNow.AddIns.Common.EditorCommand.None);
 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!