Is it possible to create an entity with an Int primary key? Below is my request to create the entity but you HAVE to use the StringAttributeMetadata. It does not allow you to use IntAttributeMetadata. Does this mean that ALL primary keys have to be strings? Thanks in advance for any help.
var createEntityRequest = new CreateEntityRequest()
{
Entity = new EntityMetadata()
{
SchemaName = $"{schema}_{entityName.ToLowerInvariant()}",
DisplayName = new Label(displayName, 1033),
DisplayCollectionName = new Label(displayCollectionName, 1033),
Description = new Label(description, 1033),
OwnershipType = OwnershipTypes.UserOwned,
IsActivity = false
},
PrimaryAttribute = new StringAttributeMetadata
{
SchemaName = $"{schema}_{primaryKeyAttributeName.ToLowerInvariant()}",
RequiredLevel = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None),
MaxLength = 100,
FormatName = StringFormatName.Text,
DisplayName = new Label(primaryKeyAttributeName, 1033),
Description = new Label($"The primary column for the {displayName} table.", 1033)
}
};