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

Can we update a custom attribute without using SOAP in an add-in?

Received Response
7
Views
8
Comments
edited May 16, 2018 7:16PM in Integrations and APIs 8 comments

Content

Hi friends,

I am trying to update a custom object lookup on incident workspace through data loaded event by add-in. I tried to use the below code but its not working. SOAP would require saving the workspace which I don't want. Can we populate the custom object ID via add-in functionality only? 

Version

May 17

Code Snippet

             IList<ICustomAttribute> inc_cust_att = incident.CustomAttributes;
foreach (ICustomAttribute val in inc_cust_att)
{
   if (val.PackageName == "CO")
    {
     if (val.GenericField.Name == "CO$Location")
      {
	val.GenericField.DataValue.Value = Convert.ToInt32(custom_object_id);
	break;
       }
    }
} 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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