VarbanVarbanov

How to add AFAttribute with Data Reference to an AFElement

Discussion created by VarbanVarbanov on Dec 20, 2012
Latest reply on Dec 21, 2012 by VarbanVarbanov

Hi, I'm sorry for wasting your time with such basic question but I'm trying to create elements with attributes with Data References to PIPoints. I was trying to create Attributes in code and call

element.Attributes.Add(attribute) 

 

and i got an exception ""Cannot add dynamically created Tag to the collection."  

I can see in AFSDK Reference, that Dynamically created attributes cannot be persisted on the server.

What i cannot see than what is the proper way to add attributes to an element...

Thank you for your help! 

Outcomes