The next version of SBA SDK is coming (under a different product name) and it's time to start looking at some of the changes in the Add-ins area.

Referencing SBAAPI.dll

First of all, we found out that our 1.0 SDK sample for UIAddIn, we were referencing SBAAPI (when we are always telling you not to do it). So now that 2.0 is coming I can show you why this is bad. The problem with this is that it references the v1 sbaapi.dll which is not going to be there for 2.0, so if you try to install this add-in in our 2.0 product you will get the following error when you try to click on the "Invoices" button.

If you don't want your add-in to work with Office Accounting 2007 then this is ok, but in case you do, here is what you need to do to remove the reference to SBAAPI.
1. In the UIAddIn project, remove the reference to SBAAPI.
2. You'll get the following build error:

CustomerInvoices.cs(63): The type or namespace name 'CustomerAccount' could not be found (are you missing a using directive or an assembly reference?)

The problem goes away if you use the ICustomerAccount instead of the CustomerAccount class that exists in SBAAPI. Here is the corrected line of code:

this.customerName = ((ICustomerAccount)smallBusinessInstance.CustomerAccounts.GetByPrimaryKey(customerID)).Name;

This problem has been fixed in our SBA SDK 2.0. You can find the SBA SDK 2.0 beta here.


Business Logic Add-ins 

If you tried using my sample code from my ISdkAddInDriver Sample that I posted in C# or in VB.NET, there are changes that you need to make if you want to remove the reference to SBAAPI.dll. If you want to do validation, you need to throw an ApplicationException instead of a SmallBusinessException, for example the new code will be:

C# -> throw new ApplicationException("EMAIL MISSING");
VB.NET -> Throw New ApplicationException("EMAIL MISSING")

One of the improvements we've made for Office Accounting 2007 in validation is the error message that users will see when the business logic add-in throws an ApplicationException.

In Small Business Accounting 2006 you will see this:

In Office Accounting 2007 you will see this:

As you can see, the error message now is shorter and more helpful. First, we show the Add-in name and we show whatever Message the Add-in specifies in the ApplicationException. You can find Office Accounting 2007 beta here.


UI Add-ins

One of the improvements we made here is the ability to have cascading menus (up to 3 levels), so now you can organize your menus better. We have updated the UI Add-in sample in SBA SDK 2.0 to show cascading menus. You can find the SBA SDK 2.0 beta here.