//Add the campaigns table to this new data source
Entity myNewEntity = api.Entities.NewEntity("Campaigns");
myNewEntity.DataSourceId = api.DataSources.GetDataSource("Donations MSSQL").Id;
myNewEntity.ObjectType = DataObjectType.Table;
myNewEntity.Id = "campaigns";
myNewEntity.DbName = "Campaigns";
myNewEntity.Name = "campaigns";
myNewEntity.ObjectDescription = "Fundraising campaigns";
myNewEntity.Category = "CRM\\Sales";
//Add column metadata for the "Campaign ID" column
myNewEntity.ColumnMetadatas.Add(new EntityColumnMetadata("Campaign ID")
{
IsFilterable = FilterableType.None,
ColumnType = "Int",
MnemonicName = "ID"
});
//Retrieve the ActualFullName of a column from this entity.
Label1.Text = myNewEntity.GetColumn("ID").ActualFullName;