cancel
Showing results for 
Search instead for 
Did you mean: 

WorkView Object Apply Changes

Jed_Kaplowitz
Star Contributor
Star Contributor

I have a problem where some of the attribute values are getting set to null.  Before the ApplyChanges I can see the values are there in my attribute list, but after ApplyChanges I don't see them.  Then when I look at the data in the OnBase Database and in the Unity Client, I can see the values are null.  The attribute type is Alphanumeric.  The value seems valid.  I can't figure out why this is not working.  

Is there a way to debug this through the Diagnostics Console, or some other tool?

Below is my code:

public Hyland.Unity.WorkView.Object CreateWVObject(Hyland.Unity.WorkView.Application wvApp, EntityFilter wvFilter, TMNA.UWWorkView.Common.WVAttribute[] wvAttributes)        {            Hyland.Unity.WorkView.Object retval = null;             try            {                Hyland.Unity.WorkView.Class cls = wvApp.Classes.Find(wvFilter.ClassName);                if (cls != null)                {                    Hyland.Unity.WorkView.Object wvObj = cls.CreateObject();                    if (wvObj != null)                    {                        AttributeValueModifier avm = wvObj.CreateAttributeValueModifier();                         foreach (var item in wvAttributes)                        {                            SetAttribute(wvApp, avm, item);                        }                                                 avm.ApplyChanges();                    }                }            }

SetAttribute hits this code:
                    case Hyland.Unity.WorkView.AttributeType.Alphanumeric:                    case Hyland.Unity.WorkView.AttributeType.Text:                    case Hyland.Unity.WorkView.AttributeType.FormattedText:                        {                            avm.SetAttributeValue(wvAttr.Name, wvAttr.Value.ToString());                            break;                        }


1 ACCEPTED ANSWER

Patrick_Ramser
Star Contributor
Star Contributor

If you have Application Server access, you can leverage Application.Diagnostics.Write() and write tracing to help you figure out how everything works via the Unity API tab in the Diagnostics Console. It's not graceful in anyway, but it's the only option for Unity Scripts since we don't have any anchor point for debugging.

View answer in original post

1 REPLY 1

Patrick_Ramser
Star Contributor
Star Contributor

If you have Application Server access, you can leverage Application.Diagnostics.Write() and write tracing to help you figure out how everything works via the Unity API tab in the Diagnostics Console. It's not graceful in anyway, but it's the only option for Unity Scripts since we don't have any anchor point for debugging.