Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Update Class Property Adding White Space

    Posted 01/12/21 11:07 AM

    Hello

    We have a small issue right now using the dot net api via WCF where an update property attempt is adding white space on the end of the update value for a string based property.

    A property with max char limit of 3 is updated with a new value of 2 (AB) characters yet in the UI we see "AB "

    Has anyone ever experienced the same issue and found a solution? Weird thing is it is not happening for all string based properties but happens 100% of the time with more than one particular property.

    We are using the sample code snippet from the documentation and our adapted code snippet is below in case it yields some clue

    IObjectStore os = Factory.ObjectStore.FetchInstance(dom, "sample object store", null);

    // now lets update the document

    var docID = new Id("12345678-1234-1234-1234-123123123123");

    // set the properties that we want to get

    PropertyFilter pf = new PropertyFilter();

    pf.AddIncludeProperty(new FilterElement(null, null, null, "SAMPLE", null));

    // now get the document

    IDocument doc = Factory.Document.FetchInstance(os, docID, pf);

    // Change property value.

    doc.Properties["SAMPLE"] = "CC";

    // Save and update property cache.

    doc.Save(RefreshMode.REFRESH);

    Any support would be much appreciated



    #FileNet
    #Support
    #SupportMigration


  • 2.  RE: Update Class Property Adding White Space

    Posted 01/14/21 02:31 PM

    Which version of CPE? You say 'yet in the UI...'. What is the UI? Have you verified it is not a display artefact?

    Very basic questions I know, but they need to be asked. I use C# with .NET/WCF extensively and never encountered anything like that.

    /Gerold



    #FileNet
    #Support
    #SupportMigration