Microsoft KB Archive/923959

= How to use the Small Business Accounting SDK to programmatically set up user-defined fields in the user interface in Small Business Accounting =

Article ID: 923959

Article Last Modified on 2/6/2007

-

APPLIES TO


 * Microsoft Office Small Business Accounting 2006
 * Microsoft Office Small Business Management Edition 2006
 * Microsoft Office Small Business Accounting 2006 Software Development Kit 1.2

-





INTRODUCTION
You can set up user-defined fields in the user interface in Microsoft Office Small Business Accounting. This article describes how to use the Small Business Accounting Software Development Kit (SDK) to programmatically set up user-defined fields.



MORE INFORMATION
You can use the Small Business Accounting SDK to programmatically set up user-defined fields in the user interface in Small Business Accounting. When you do this, you can name and then enable a user-defined field.

The following code sample sets up, names, and then enables a boolean field. The field is named &quot;Is Vested.&quot; // Retrieve user field setup object for employee accounts. IUserFieldsSetup empFieldSetup = iSbi.UserFieldsSetup(AccountType.EmployeeAccount); // Check whether Bool1 user field is already defined for this account type. if (! empFieldSetup.Bool1Active) {   //Clear out any existing data. empFieldSetup.ClearFieldForType(typeof(Boolean), 1); // Add a field to indicate if the employee is vested for 401(k). empFieldSetup.Bool1Label = &quot;Is Vested&quot;; empFieldSetup.Bool1Active = true; // Save user fields information. empFieldSetup.Save; }

Keywords: kbexpertiseadvanced kbmsccsearch kbhowto KB923959

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.