How to use BBMetalWeb and leverage the generated classes in your BBIS parts

A few weeks ago I was having to write some BBIS parts that were supposed to call some specs that were loaded into BBEC. These instructions are going to assume that you have already created and loaded your catalog specs into BBEC.

I have 2 specs, a view form and a data list, that I want to leverage from my BBIS part. In order to do that I have to complete the following:

1. Create a role in BBEC that has permission for the specs

2. Run BBMetalWeb to create the classes that I need to use

3. Import the classes into your project

4. Implement those classes into your code

Create a role in BBEC by going to Administration –> Security –> System Roles –> Add.

After that you will be taken to that role’s page. Go to the features tab and click assign feature permissions.


Select the feature you want and then make sure to click “Grant” and then save the form.image_thumb_1_3

Now after your role has granted features let’s get into the BBMetalWeb part. I usually create a folder on my desktop called bbmetal that I use as the output folder for BBMetalWeb.

Open up the command prompt and navigate to SDK\Tools\. Now there are few arguments that need to be specified here in order to make BBMetalWeb work correctly and they are as follows:

a) /wsuri=(the path to your appfxwebservice.asmx)

b) /db=(your db)

c) /targetpath=(where you want the outputted files to be created)

d) /inputrolename=(the name of the role that we created in bbec)

Now my command looks something like this: bbmetalweb.exe /wsuri=http://localhost/yale/appfxwebservice.asmx /db=yale /targetpath=C:\Users\Chriswh\Desktop\bbmetal\ /inputrolename=myrole

After you run this you should get output that looks like this:


Now check your output folder and you should have some new folders and files created.


There are more options available for your use within BBMetalWeb. To find out what those are type BBMetalWeb and hit enter at the command line and it will show you all arguments. Now let’s import the codegen files into your project within Visual Studio. I like to have all of my codegen files in one folder for simplicity’s sake.image_thumb_4_2

From here you can now reference the different methods on the codegen objects. For instance the following code calls a viewform and gets the value of the field PASSWORD.

BBMetalWeb.ViewForms.PasswordForConstituent.LoadData(New Blackbaud.AppFx.WebAPI.AppFxWebServiceProvider(), constituentId).PASSWORD

All of the codegen files can be referenced and used. One note here is that I change the namespaces of the codegen class to reflect how I call the view form above. It makes everything more organized.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s