8 Replies Latest reply on Oct 6, 2016 4:29 PM by Arpit

    Unable to update AF attribute (non configuration item)

    Arpit

      Hello

       

      I am trying to update attributes for an element which are not configuration items, but the value does not reflect in System explorer even though i don't see any errors in the code

       

      Below is the code snippet

       

      oAFElementType.Elements[ElementName.ToUpper(CultureInfo.InvariantCulture)].Attributes["attribute 1"].SetValue(new AFValue(value));

      oAFElementType.Elements[ElementName.ToUpper(CultureInfo.InvariantCulture)].Attributes["attribute 2"].SetValue(new AFValue(value));

      oAFElementType.Elements[ElementName.ToUpper(CultureInfo.InvariantCulture)].Attributes["attribute 3"].SetValue(new AFValue(value));

      oAFElementType.Elements[ElementName.ToUpper(CultureInfo.InvariantCulture)].Attributes["attribute 4"].SetValue(new AFValue(value));

                                                             

      oAFElementType.CheckIn();

      oAFElementType.ApplyChanges();

      obj_AFDatabase.CheckIn();

      obj_AFDatabase.ApplyChanges();

       

      Now - Attribute 1 and 2 are configuration items but 3 and 4 are not.

       

      When i am executing the above code i am able to see the values for 1 and 2 but not for 3 and 4.

       

      I have also tried putting attribute 3 and 4 outside the checkins and apply changes but that does not work as well.

       

      Please help. Many thanks.