As of April 17, 2018, this site is now in read-only mode. To start new Blackbaud Developer’s discussions, you will find Developer Discussions in the Blackbaud CRM Community.

To post or respond to Blackbaud Community discussions, you will have to login using a login. Learn how to login here. If you have questions or need assistance, please email

1.7k questions

3.2k answers

401 users


1.7k questions

3.2k answers

401 users

I have been tasked with creating a customization in BBEC that uses custom attribute tables. Is there a best-practices way in which I can create these custom attribute tables in the Development environment, and port the tables to the Live environment without having to tweak the SQL that accesses the custom attribute data as I move my customization from Development to Live?

Many thanks in advance

James Tullett

asked by

1 Answer

Yes, this can be a pain. The easiest way to do this is is to script out the attribute creation process and ignore the UI. This way the ID's / table names will remain the same and you can keep the SQL the way you have it. Here is a sample one from an older project of mine that uses a codetable.

declare @CHANGEAGENTID uniqueidentifier


if not exists (select null from dbo.CODETABLECATALOG where ID = '3e8d5879-da3e-43a8-beab-1fb4821f11aa')
exec dbo.USP_LOADSPEC N'<CodeTableSpec xmlns:xsi="" xmlns:xsd="" xmlns="bb_appfx_codetable" ID="3e8d5879-da3e-43a8-beab-1fb4821f11aa" Name="Congressional District" Description="This code table stores the translations of congressional districts." Author="Blackbaud Product Development" DBTablename="CONGRESSIONALDISTRICTCODE" Category="Biographical" IsBuiltIn="true"><InstalledProductList xmlns="bb_appfx_commontypes"><InstalledProduct ID="3117d2c8-7f46-42f2-abeb-b654f2f63046" /><InstalledProduct ID="42c15648-749e-4859-a56d-3a6474814cc7" /><InstalledProduct ID="6f77d512-d0d1-444f-9b46-b8603a6fe5f1" /><InstalledProduct ID="bb9873d7-f1ed-430a-8ab4-f09f47056538" /><InstalledProduct ID="a919502c-a2f6-4a56-9183-28e3f667916e" /></InstalledProductList></CodeTableSpec>'

if not exists (select null from dbo.ATTRIBUTECATEGORY where ID = '288f9837-bed2-403a-b90e-fec415e98c1f')
    @ID = '288f9837-bed2-403a-b90e-fec415e98c1f',
    @NAME = N'Congressional District',
    @ATTRIBUTERECORDTYPEID = '5e92dd4c-e031-441a-998a-998d370bc3a6',
    @CODETABLECATALOGID = '3e8d5879-da3e-43a8-beab-1fb4821f11aa',
answered by davidhodge (1.8k points)