Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Finds or creates an attribute value of the supplied attribute type, with the attribute linked to some entity through the supplied instance table record id.
The attribute group parameter is used to look for the attribute of the supplied type in, and to determine the default value, if attribute needs to be created.
Note the method will not create a value if it could not find an attribute of the specified type in the specified group! An exception will be thrown in this case.
Syntax
client server public static EcoResValue findOrCreateAttributeValue(
RecId _instanceValueRecId,
RecId _attributeGroupRecId,
RecId _attributeTypeRecId,
[boolean _forUpdate])
Run On
Called
Parameters
- _instanceValueRecId
Type: RecId Extended Data Type
The records id of the linking table, that links the supplied attribute and some entity, for which the value is being looked up.
- _attributeGroupRecId
Type: RecId Extended Data Type
The EcoResAttributeGroup record id of the attribute group to look the attribute in or create in. It is also used to determine the default value for the attribute.
- _attributeTypeRecId
Type: RecId Extended Data Type
The attribute type of the attribute to find or create a value for.
- _forUpdate
Type: boolean
A Boolean value that indicates whether to read the record for update; optional.
Return Value
Type: EcoResValue Table
The attribute value.
Exceptions
Exception | Condition |
---|---|
Error | Throws an exception if the method could not find an attribute of the specified type in the specified group. |