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

Update Custom Attribute from plug-in, (Using desktop API, NOT the soap API)

Received Response
edited May 12, 2016 4:04PM in UI Extensibility 1 comment


I have a custom attribute (text field), on my incident workspace. Which I want to set to no value, without resorting to SOAP API. 

the following code will set the value correctly (when going from no value, to having a value), but, when setting it to no value, nothing happens.

(this function handles both custom fields, and custom attributes. I'm not interested in the custom field portion(the else). it works fine.




Service Cloud Feb 2016 sp2 (build 257)

Code Snippet

             private void SaveTextField(int cfid, string attributeName, string txt)
    if (!string.IsNullOrEmpty(attributeName))
         var attribute = incident.CustomAttributes.FirstOrDefault(f => f.GenericField.Name == attributeName);  //get the attribute from the workspace

         attribute.GenericField.DataValue.Value = txt; //set the new value               

Howdy, Stranger!

Log In

To view full details, sign in.


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