02-11-2016 10:33 AM
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; }
02-17-2016 08:27 AM
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.
02-17-2016 08:27 AM
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.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.