Hi,
I have a custom attribute which I have loaded into DMX using the ControlToload. In the code for the control, this is how I try and get the attribute id for this attribute
attList = AttributesController.GetAttributesByPortal(PortalId,
"")For Each attInfo As AttributeInfo In attList.ValuesIf attInfo.Name = "MyCA" Then
attId = attInfo.AttributeId
End If
objEA = EntryAttributesController.GetEntryAttribute(
Next Dim objEA As EntryAttributeInfoMe.CurrentEntry.EntryId, attId, "")
However AttributesController.GetAttributesByPortal(PortalId, "") does not return this custom attribute and so I never get the attributeID. If I execute the stored proc DMX_GetAttributesByPortal with PortalID = 0 and Locale = '', I do see the row for MyCA Custom Attribute. Why is that?
I was using the FindAttributeByName method in the last version but that method does not exist anymore. I do see a FindAttributeByKey method but since there is no way for me through the UI to specify a key for custom attributes when loading them, I cannot use it. I do not want to set the key in the database for each custom attribute I create. How do you recommend getting the attribute or attributeID of a custom attribute in the LoadSettings and WriteToCurrentEntry procedures of the custom attribute?
Also I noticed that the locale is set to "" instead of en-US (which is my default culture), when adding any new folder or attribute to DMX. Is that how it is supposed to be?