|
Guides (SDK /API) | Technical Reference | BBDN | How-to Documentation |
Code sample project: Custom Pledge Form
Right-click your CustomPledgeInfinity project in your PartsProjectExample solution and select Add > New Item. The Add New Item screen appears.
Under Installed Templates, click Blackbaud AppFx Catalog.
Select Table Spec.
In Name, enter CustomPledgeRecord.Table.xml.
Click Add. The Table Spec appears in an editor.
Adjust the TableSpec attributes.
<TableSpec xmlns="bb_appfx_table" xmlns:common="bb_appfx_commontypes" ID="b8746f13-9fa6-44a1-aea7-6198d65eace7" Name="CustomPledgeRecord" Description="A custom pledge record to hold pledge information from a custom BBIS pledge form" Author="Technical Training" Tablename="USR_CUSTOMPLEDGERECORD" >
Add definitions for the fields on the table.
<TextField Name="KEYNAME" Required="true" Description="Last name" Length="100"/> <TextField Name="FIRSTNAME" Required="true" Description="First name" Length="100"/> <TextField Name="MIDDLENAME" Required="false" Description="Middle name" Length="100"/> <ForeignKeyField Name="CONSTITUENTID" Required="false" Description="Foreign key to constituent record" ForeignTable="CONSTITUENT" ForeignFieldName="CONSTITUENTID" /> <EmailAddressField Name="EMAIL" Description="Email address"/> <CodeTableField CodeTable="USR_CUSTOMCLASSYEARCODE" Name="USR_CUSTOMCLASSYEARCODEID" Required="false" Description="Custom class year code" /> <CodeTableField CodeTable="ACADEMICYEARCODE" Name="ACADEMICYEARCODEID" Required="false" Description="Academic year code" /> <CodeTableField CodeTable="EDUCATIONALHISTORYLEVELCODE" Name="EDUCATIONALHISTORYLEVELCODEID" Required="false" Description="Educational history code" /> <MoneyField Name="AMOUNT" Description="Amount of pledge" Required="true"/>
The completed Table Spec should look like this:
<TableSpec xmlns="bb_appfx_table" xmlns:common="bb_appfx_commontypes" ID="b8746f13-9fa6-44a1-aea7-6198d65eace7" Name="CustomPledgeRecord" Description="A custom pledge record to hold pledge information from a custom BBIS pledge form" Author="Technical Training" Tablename="USR_CUSTOMPLEDGERECORD" > <!-- define fields on the table --> <Fields> <TextField Name="KEYNAME" Required="true" Description="Last name" Length="100"/> <TextField Name="FIRSTNAME" Required="true" Description="First name" Length="100"/> <TextField Name="MIDDLENAME" Required="false" Description="Middle name" Length="100"/> <ForeignKeyField Name="CONSTITUENTID" Required="false" Description="Foreign key to constituent record" ForeignTable="CONSTITUENT" ForeignFieldName="ID" /> <EmailAddressField Name="EMAIL" Description="Email address"/> <CodeTableField CodeTable="USR_CUSTOMCLASSYEARCODE" Name="USR_CUSTOMCLASSYEARCODEID" Required="false" Description="Custom class year code" /> <CodeTableField CodeTable="EDUCATIONALHISTORYLEVELCODE" Name="EDUCATIONALHISTORYLEVELCODEID" Required="false" Description="Educational history code" /> <MoneyField Name="AMOUNT" Description="Amount of pledge" Required="true"/> </Fields> </TableSpec>