Sie sind auf Seite 1von 28

SOLUTIONS

Microsoft Dynamics Entrepreneur Solution

Developing ISV Solutions for


Microsoft Dynamics Entrepreneur
Technical White Paper

June 2008
The information contained in this document represents the current view of Microsoft Corporation on the
issues discussed as of the date of publication. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft
cannot guarantee the accuracy of any information presented after the date of publication.

These guidelines are for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights
under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval
system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property
rights covering subject matter in this document. Except as expressly provided in any written license
agreement from Microsoft, the furnishing of this document does not give you any license to these
patents, trademarks, copyrights, or other intellectual property.

Unless otherwise noted, the example companies, organizations, products, domain names, e-mail
addresses, logos, people, places, and events depicted herein are fictitious, and no association with any
real company, organization, product, domain name, email address, logo, person, place, or event is
intended or should be inferred.

© 2008 Microsoft Corporation. All rights reserved.

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Table of Contents
Introduction ....................................................................................................................... 4

Solution Architecture ........................................................................................................ 4


The Client tier .................................................................................................................................................................................... 4

Development Environment and APIshhh........................................................................ 6


C/SIDE................................................................................................................................................................................................... 6
C/FRONT ............................................................................................................................................................................................. 8

How to become an ISV ...................................................................................................... 9

More information .............................................................................................................. 9

Appendix .......................................................................................................................... 11
C/FRONT Library Functions ...................................................................................................................................................... 11
Development Best Practices ..................................................................................................................................................... 15

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Introduction
Microsoft Dynamics® Entrepreneur is an integrated business management solution developed specifically
to meet the needs of small companies by helping them run their most important business areas—such as
financial, purchase, inventory, and sales and marketing. With Microsoft Dynamics® Entrepreneur, small
businesses can improve the efficiency of their operations and make confident decisions by focusing less
on administrative tasks and more on their business. Built for ease of use, it works like and with familiar
software and solutions—such as the Microsoft® Office system, Microsoft Office Outlook®, or Microsoft
SQL Server®—that most small businesses already use.
Microsoft Dynamics Entrepreneur provides an extensive, horizontal, and powerful enterprise resource
planning (ERP) platform so that ISVs can focus on developing the value-added functionality that
differentiates their solutions. As a result of developing value-added functionality, ISVs don’t have to
spend time, money and effort developing complex business functionality which is already available in
Microsoft Dynamics Entrepreneur.
Add-on solutions are ISV applications—independently developed by a Microsoft Dynamics partner—that
are enabled when used with Microsoft Dynamics Entrepreneur. Add-on applications complement and
supplement the functionality in Microsoft Dynamics Entrepreneur and can be delivered and implemented
for multiple customers. Although add-on applications may address an industry-specific need (vertical
solutions) or general business processes (horizontal solutions), it is not possible to include any of the
existing Microsoft Dynamics Entrepreneur functionality, technology or users in an add-on application.
Microsoft Dynamics Entrepreneur is built on the proven Microsoft Dynamics NAV platform—and both
share the same code base and data model. So developing add-on applications is similar for both
business solutions, and ISVs can create a single add-on and sell it for two products and market
segments. Having a common code base also simplifies maintaining an add-on solution, and it can greatly
reduce development cost and administration.
Most of the Microsoft Dynamics NAV development materials and tools are valid for use with Microsoft
Dynamics Entrepreneur, and throughout this document these will be referenced when applicable. The
Microsoft Dynamics Entrepreneur Developer’s Guidelines identifies the specific areas in the Microsoft
Dynamics NAV documentation that are not valid for Microsoft Dynamics Entrepreneur.
This white paper gives you a technical introduction to developing add-on solutions for Microsoft
Dynamics Entrepreneur. It is not a complete guide for creating applications, but provides links and
references to additional documents and supporting materials throughout the text.

Solution Architecture
Microsoft Dynamics Entrepreneur is designed as a two-tier application. It consists of a Database
Management System (DBMS) that resides on a server and a Graphical User Interface (GUI) that resides on
each client. In this two-tier architecture, the data and data manipulation layers reside on the server,
whereas the application logic, presentation logic, and presentation layers reside on the client.

The Client tier


The Microsoft Dynamics Entrepreneur Client is responsible for the user interface (UI) and executing the
business logic. The client reads the application objects from the database and is also responsible for
running the objects and controlling their behavior. Most of the Microsoft Dynamics Entrepreneur
application runs on the individual clients.
The Microsoft Dynamics Entrepreneur Client is located on the client tier. It consists of an administration
component for administrators and super users and as well as a client component for regular user access.
4

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


The client tier also has specific connections for data transfer to the server tier and the database
management component.

Server
Some of the functions that the standard server component of Microsoft Dynamics Entrepreneur is
responsible for are:
 Controlling the number of users that can connect to the database at one time.
 Controlling access to the data through locking.
 Keeping track of all the read and write transactions performed by each user.
 Sending data to each client, as requests are made.
 Performing all the key-based filtering and calculating the SumIndexFields.
 Caching data that can be requested again.

NAS
The NAV Application Server (NAS), which is compatible with Microsoft Dynamics Entrepreneur, is an
optional middle-tier server that supports an n-tier architecture and executes business logic without user
intervention. The NAS enables communication with external services, acts as a client toward a database
server, and can act as a server for other services. When starting the NAS, it opens a predefined database
and executes the Client Application Language (C/AL) code in a predefined Codeunit. The NAS only
supports Windows® Authentication and automatically reconnects to the database server if there is a
problem with the network.

Figure 1: The Microsoft Dynamics Entrepreneur two-tier architecture

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Development Environment and APIs
Depending on the type of ISV add-on solution, there are two different integration options: embedded or
connecting. Embedded ISV solutions are fully integrated into the Microsoft Dynamics Entrepreneur base
product and are developed in the Client/Server Integrated Development Environment (C/SIDE®).
Connecting ISV solutions that only require access to the data stored in the Microsoft Dynamics
Entrepreneur database—for example, modifying customer data—can utilize the C/FRONT interface.
Microsoft Dynamics Entrepreneur is designed specifically to help small organizations manage their
business. Understanding the code in Microsoft Dynamics Entrepreneur can help you develop integrations
that can utilize business functionality in an optimal way. It can also help you understand the underlying
business processes.
Understanding business processes is crucial to selling applications in the small business market. For
example, to calculate invoice discounts, value-added tax (VAT) rules, inter-company transactions, or
credit card reconciliations, you must understand the associated business process.
Learning to work and develop with Microsoft Dynamics Entrepreneur is not primarily about learning a
new programming language. It’s more about learning how business processes work in Microsoft
Dynamics Entrepreneur, which can help you to develop the most efficient code and integrations and
explain how the business works to potential customers.
If you are not familiar with the business processes, then you risk programming code and enabling
integration that does not use the business solution to the best advantage. So the key to expanding into
the small business market is learning the day-to-day operations of small companies. Microsoft Dynamics
Entrepreneur and its flexible development environment provide this key.

C/SIDE
C/SIDE is an object-based, secure, and efficient development environment combined with an easy-to-use
GUI. C/SIDE enables access to the Microsoft Dynamics Entrepreneur application source code, so you can
develop powerful and fully integrated solutions. C/SIDE provides a number of development options,
including using new or modifying existing functionality, reusing functionality for various purposes,
redesigning the UI, and modifying and executing business logic. Because of the close integration with
Microsoft Dynamics Entrepreneur, add-on solutions developed with C/SIDE must pass a software
certification test before distribution.
C/SIDE is not object-oriented, but object-based. This is an important distinction. In an object-oriented
language or environment, the developer can create new types of objects that are based on the ones that
are already in the system. In C/SIDE, there are seven types of the application objects, and that is all. The
objects are Tables, Forms, Reports, Dataports, XMLports, Codeunits, and MenuSuites. By limiting
developers to these seven objects, they can work quickly and efficiently. The biggest benefit from this
limitation? It is fairly difficult to create a severe bug in C/SIDE.
Object Type Explanation
Table Stores the actual data. Typically a business application has a
Customer table that stores information such as name, address,
phone number, and contact person for each customer.
Form Used to access the information contained in tables. Forms are
used both when users enter new information, and when they
view existing information.
Report Presents data that contains summary information. For example,
use a report to print a list of customers.
Dataport Imports and exports information to and from other programs;

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


for example, a comma-separated file from a spreadsheet.
XMLport Imports and exports data in XML format. XMLports make the
process of exchanging data in XML between systems simpler and
more streamlined.
Codeunit Contains user-defined functions written in C/AL code. These
functions can be used from the other objects in your application,
which reduces the size of your add-on application because the
same code can be reused.
MenuSuite Contains the menus displayed in the Navigation Pane and in the
Navigation Pane Designer. For example, each menu contains
content for a specific departmental area, such as Finance or
Manufacturing.

Writing functions in C/SIDE is done in C/AL. In C/SIDE, the main purpose of the programming language is
data manipulation. Through C/AL, you can create business rules to help ensure that the data stored in
the tables are meaningful and consistent with the way your customer does business. You can add new
data or transfer data from one table to another—for example, a journal to a ledger. If data from multiple
tables need to be combined in one report or displayed on one form, you will probably need to program
this functionality. Another purpose of C/AL is to control the execution of the various C/SIDE objects. With
C/AL, you are able to coordinate the objects in a way that meets the business needs of your customer.
The Object Designer is the main tool for developing C/SIDE applications. Use it to:
 Design new Tables, Forms, Reports, Dataports, XMLports and Codeunits. You design
MenuSuite objects in the Navigation Pane Designer.
 View existing application objects. However, you view the content of a MenuSuite object in the
Navigation Pane Designer, or in the Navigation Pane at runtime.
 Modify existing application objects with the exception of MenuSuite objects that are modified
in the Navigation Pane Designer.
 Run an application object, except XMLports and MenuSuite objects.

Figure 2: Microsoft Dynamics Entrepreneur C/SIDE Object Designer

The C/SIDE development environment is accessible not only to developers, but also to experts in a given
business area. For example, someone who understands the distribution business doesn’t necessarily have
to be a trained programmer to develop add-on solutions for a wholesale company. The source code’s
components are very descriptive, and the programming is in everyday, easy-to-understand language. For

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


example, when programming a currency function, you might find the following description for a line of
code:
‖IF Currency.FIND('-') THEN‖

This line of code indicates that there will be a check as to whether the currency codes created are in the
currency table.

The descriptiveness of the language makes Microsoft Dynamics Entrepreneur a good base for building
on business expertise and learning the underlying processes of a specific business area. This is a short
example of C/AL code included in Microsoft Dynamics Entrepreneur:

Figure 3: Example of C/AL code in Microsoft Dynamics Entrepreneur

For more information regarding C/SIDE, please see the Application Developer Guide as well as the
C/SIDE Reference Guide mentioned in the More information section.

C/FRONT
C/FRONT is an application programming interface that is used to access a Microsoft Dynamics
Entrepreneur database from environments such as Microsoft Office Excel® and Microsoft Office Word, or
Microsoft Visual Basic®. C/FRONT provides C programming language developers with the ability to read
and write to the database. The C/FRONT tool also enables Microsoft .NET application developers to
create programs in the Microsoft Visual Studio® .NET development environment that can access a
Microsoft Dynamics Entrepreneur database.
For example, if users want to build sophisticated budgeting functions that require a spreadsheet, they
can configure Excel to act as a controller to their Microsoft Dynamics Entrepreneur server. Budgets or
actual figures can then be read from Microsoft Dynamics Entrepreneur, manipulated in Excel, and written
back to the database. You don't need to perform any intermediate steps, such as importing or exporting
data to accomplish this. C/FRONT can also be a useful tool for data collection systems, such as barcode
readers for order fulfillment.
You don’t have to know how to write code in Microsoft Dynamics Entrepreneur to use C/FRONT. In fact,
you don’t even have to work in the Microsoft Dynamics Entrepreneur development environment. By
using C/FRONT, you can, for example, access a specific company in the Microsoft Dynamics Entrepreneur
8

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


database, read and write records, and update tables in your preferred programming language without
worrying about programming in a different language.
C/FRONT removes the time-consuming steps of importing and exporting data, so that information can
flow smoothly between applications. C/FRONT can be used with any programming language and
compiler that can load and use dynamic-link libraries (DLLs) and that use the _CDECL calling convention.
C/FRONT provides three API format options:
 The C-Application Program Interface (C-API) format is primarily intended for C programmers
and enables programs developed using the Visual C and Visual C++® programming languages
to access Microsoft Dynamics Entrepreneur directly, using DLL.
 The Microsoft Object Linking and Embedding (OLE) Control (OCX) format enables access to
C/SIDE by any program that can act as an automation client. This includes products such as Excel
and Visual Basic.
 The C/FRONT.NET API enables the same interface as C-API to be accessed by any .NET API
programming language or tool. For example Microsoft Visual C#® API or Visual Basic .NET API.
Please note that the main purpose of C/FRONT is data input and output. It is not possible to invoke
business logic through this interface and no data validation is performed. For an overview of all available
functions, please refer to the Appendix, which contains an overview of all functions available through
C/FRONT. The Application Designer’s Guide (found in the Microsoft Dynamics NAV Developer
Documentation referenced in the More information section) contains additional information about the
interface.

How to become an ISV


To become an ISV for Microsoft Dynamics Entrepreneur and gain access to all development tools and
documentation, please contact your local Microsoft subsidiary. You'll then need to follow this process:
● Submit Business Plan to local Microsoft subsidiary.
● Sign the Microsoft Dynamics Entrepreneur ISV Developer Registration Agreement and the Add-
on Addendum.
● Connect with a value-added distributor (VAD) to discuss distribution terms.
● Submit the Microsoft Dynamics Entrepreneur Add-on Request Form.
● Pass the Software Solution Test for Microsoft Dynamics Entrepreneur.
Please note that this process applies only to ISVs of embedded add-on solutions. ISVs of connecting
add-on solutions through C/FRONT do not need to follow this process. To gain access to the product
and interface definitions, please contact your local Microsoft subsidiary.

More information
Your first and foremost source of information should be your local Microsoft subsidiary. Microsoft
recommends that you contact the local representative in your country or region who is responsible for
Microsoft Dynamics Entrepreneur to receive further guidance. For more information about Microsoft
Dynamics Entrepreneur and the ISV business opportunity, please use the following resources.
Microsoft Dynamics Entrepreneur Solution Overview
White paper: Providing ISV Solutions for Microsoft Dynamics Entrepreneur Solution 2008
Microsoft Dynamics Entrepreneur Solution Add-on Documentation (PartnerSource – requires login)

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


For more technical information about the development of ISV add-on solutions for Microsoft Dynamics
Entrepreneur, please refer to the following resources:
Microsoft Dynamics Entrepreneur Solution 2008 Developer Guidelines
Microsoft Dynamics sites on MSDN
How to Modify the Microsoft Dynamics Entrepreneur Setup Wizard (PartnerSource – requires login)
Microsoft Dynamics Entrepreneur Software Solution Test Specification (PartnerSource – requires login)
Microsoft Dynamics Entrepreneur uses Microsoft Dynamics NAV as a technical platform, so the
development documentation for Microsoft Dynamics NAV also applies to Microsoft Dynamics
Entrepreneur. The following documents might be especially helpful:
Microsoft Dynamics NAV Developer Documentation
Innovate On Microsoft Dynamics
Microsoft Dynamics NAV Overview
Certified for Microsoft Dynamics Software Solution Test

10

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Appendix

C/FRONT Library Functions

Initialization and Finalization Functions


Function Purpose
DBL_Init() Initializes the library
DBL_Exit() Closes the library
DBL_SetNavisionPath() Sets the path to the Navision files

Database Functions
Function Purpose
DBL_ConnectServerandOpenDatabase() Connects to a server and opens a database
DBL_ConnectServer() Connects to a server
DBL_DisconnectServer() Disconnects from a server
DBL_ReleaseAllObjects() Frees all resources in C/FRONT
DBL_OpenDatabase() Opens a database
DBL_CloseDatabase() Closes a database
DBL_OpenCompany() Opens a company
DBL_CloseCompany() Closes a company
DBL_CompanyName() Retrieves the current company name
DBL_NextCompany() Scans company names
DBL_GetDatabaseName() Tests whether a database is open and—if it is open—returns its name
DBL_GetLanguage Retrieves the language ID that is currently used
DBL_CheckLicenseFile() Checks user permissions against license file
DBL_LoadLicenseFile() Loads a license file
DBL_GetVersion() Gets version number of C/FRONT library
DBL_AddKey() Adds keys and SumIndexFields to a table
DBL_AddTableField() Adds a field to a table
DBL_CreateTable() Creates a database table
DBL_CreateTableBegin() Acquires a create table handle
DBL_CreateTableEnd() Releases a create table handle
DBL_DeleteTable() Deletes a table from a database
DBL_SetLanguage() Sets the language ID
DBL_TestSysPermission() Tests whether the current license has execute permission to a specified
object
DBL_Str_Compare_Database() Compares 2 strings in the database

Security Functions
Function Purpose
DBL_Login() Authorizes entry to a database
DBL_UserID() Retrieves current user ID
DBL_UserCount() Counts users in a database
DBL_CryptPassword() Encrypts password
DBL_UseCodeUnitsPermissions() Enables you to use the permissions of a codeunit

11

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Table Functions
Function Purpose
DBL_OpenTable() Opens a table
DBL_CloseTable() Closes a table
DBL_GetView() Returns the sort, key, and filters on a table
DBL_OpenTemporaryTable() Creates a temporary table
DBL_LockTable() Locks a table
DBL_TableCaption() Retrieves the table caption
DBL_TableDup() Duplicates a table
DBL_TableIsSame() Compares two tables
DBL_TableName() Retrieves a table name
DBL_TableNo() Retrieves a table number
DBL_NextTable() Scans table numbers
DBL_CalcSums() Accumulates the sums of specified columns
DBL_SetView() Sets the current sort, key, and filters on a table

Record Functions
Function Purpose
DBL_AllocRec() Creates a record buffer
DBL_DupRec() Duplicates a record
DBL_FreeRec() Removes a record buffer
DBL_FindRec() Finds a record
DBL_FindTopRec() Finds the first or the last record
DBL_FindSet() Finds a set of records
DBL_NextRec() Scans records
DBL_InsertRec() Inserts a record
DBL_DeleteRec() Deletes a record
DBL_DeleteRecs() Deletes all records in a table
DBL_ModifyRec() Modifies a record
DBL_CopyRec() Copies a record
DBL_CmpRec() Compares two records
DBL_InitRec() Initializes fields in a record
DBL_RecCount() Counts records
DBL_RenameRec() Renames a record
DBL_CalcFields() Updates FlowFields in a record

Transaction Functions
Function Purpose
DBL_BWT() Begins a write transaction
DBL_EWT() Ends a write transaction
DBL_AWT() Aborts a write transaction
DBL_SelectLatestVersion() Selects the latest data version

12

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Field Functions
Function Purpose
DBL_FieldCaption() Retrieves the caption for a field in a table
DBL_FieldCount() Counts the number of fields in record
DBL_NextField() Scans the fields in a table
DBL_FieldLen() Retrieves the declared length of a field
DBL_FieldNo() Retrieves a field number
DBL_FieldName() Retrieves a field name
DBL_FieldType() Retrieves a field type
DBL_FieldSize() Retrieves the field size in bytes
DBL_AssignField() Assigns a value to a field in a record
DBL_GetFieldData() Retrieves data from a field
DBL_GetFieldDataAddr() Retrieves the address of field data
DBL_GetFieldDataSize() Retrieves the size of field data
DBL_FieldDataOffset() Retrieves the offset of a field
DBL_FieldOptionCaption() Retrieves the option caption for a field
DBL_FieldOptionStr() Retrieves the option string of a field
DBL_FieldClass() Retrieves the class of a field

Key Functions
Function Purpose
DBL_SetCurrentKey() Sets the current key for a table
DBL_GetCurrentKey() Retrieves the current key
DBL_KeyCount() Counts the keys
DBL_NextKey() Scans the keys of a table
DBL_KeySQLIndexFields() Retrieves the SQLIndexFields of a key
DBL_KeySumFields() Retrieves the SumIndexFields of a key

Filter Functions
Function Purpose
DBL_SetFilter() Sets a filter for a field
DBL_GetFilter() Retrieves the current filter
DBL_SetRange() Sets a range filter for a field
DBL_GetRange() Retrieves the current range filter

Conversion Functions
Function Purpose
DBL_Field_2_Str() Converts a value to a string
DBL_YMD_2_Date() Converts date elements to DATE type
DBL_Date_2_YMD() Converts a DATE type to date units
DBL_DateFormula_2_Str() Converts a DateFormula to a string
DBL_Datetime_2_Str() Converts a Datetime to a string
DBL_Datetime_2_Str_Ex() Converts a Datetime to an extended string
DBL_Datetime_2_YMDHMST() Converts a Datetime to years, months, days, hours, minutes, seconds,
and, thousandths of a second
DBL_Datetime_2_YMDHMST_Ex() Converts a Datetime to years, months, days, hours, minutes, seconds
and thousandths of a second and enables you display it as UTC or local
time
DBL_Duration_2_Str() Converts a Duration to a string
DBL_HMST_2_Time() Converts time elements to TIME type
DBL_Time_2_HMST() Converts TIME type to time units
DBL_Alpha_2_Str() Converts ALPHA type to string
DBL_Str_2_Alpha() Converts string to ALPHA type

13

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


DBL_Date_2_Str() Converts a DATE to a string
DBL_Str_2_Date() Converts a string to a DATE
DBL_Str_2_Field() Converts a string to a field value
DBL_Time_2_Str() Converts TIME to string
DBL_Str_2_Time() Converts string to TIME
DBL_Str_2_DateFormula() Converts a string to DateFormula
DBL_Str_2_Datetime() Converts a string to a Datetime
DBL_Str_2_Datetime_Ex() Converts a string to an extended Datetime
DBL_Str_2_Duration() Converts a string to a Duration
DBL_Str_2_S64() Converts a string to a biginteger
DBL_Ansi2OemBuff() Converts string from ANSI to OEM
DBL_Oem2AnsiBuff() Converts string from OEM to ANSI
DBL_S32_2_S64() Converts an integer to a biginteger
DBL_S64_2_S32() Converts a biginteger to an integer
DBL_S64_2_Str() Converts a biginteger to a string
DBL_YMDHMST_2_Datetime() Converts years, months, days, hours, minutes, seconds and, thousandths
of a second to a Datetime
DBL_YMDHMST_2_Datetime_Ex() Converts years, months, days, hours, minutes, seconds and, thousandths
of a second to an extended Datetime

BCD Functions
Function Purpose
DBL_BCD_2_Str() Converts a BCD number to a string
DBL_Str_2_BCD() Converts a string to a BCD number
DBL_BCD_2_Double() Converts a BCD number to a double
DBL_Double_2_BCD() Converts a double to a BCD number
DBL_BCD_2_S32() Converts a BCD number to an S32
DBL_S32_2_BCD() Converts an S32 to a BCD number
DBL_BCD_IsZero() Tests if a BCD number has a value of zero
DBL_BCD_IsNegative() Tests if a BCD number is negative
DBL_BCD_IsPositive() Tests if a BCD number is positive
DBL_BCD_Div() Divides one BCD number by another BCD number
DBL_BCD_Mul() Multiplies one BCD number by another BCD number
DBL_BCD_Add() Adds two BCD numbers together
DBL_BCD_Sub() Subtracts one BCD number from another BCD number
DBL_BCD_Abs() Returns the absolute value of a BCD number
DBL_BCD_Neg() Reverses the sign of a BCD number
DBL_BCD_Power() Raises a BCD number to a power
DBL_BCD_Sgn() Returns the sign of a BCD number
DBL_BCD_Cmp() Compares one BCD number to another BCD number
DBL_BCD_Trunc() Truncates a BCD number
DBL_BCD_Round() Rounds a BCD number
DBL_BCD_RoundUnit() Rounds a BCD number to a unit
DBL_BCD_Make() Returns a BCD number

Error-Handling and Exception-Handling Functions


Function Purpose
DBL_Allow() Specifies the error to be allowed
DBL_SetExceptionHandler() Installs a custom exception handler
DBL_SetMessageShowHandler() Installs custom message handler
DBL_GetLastErrorCode() Retrieves code of last error

14

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Development Best Practices
To start the Microsoft Dynamics Entrepreneur add-on development process, we’ve collected a number of
best practices used by various ISVs throughout the world. Some of the advice may not be applicable to
you, but many tips are worth considering if you are developing your own add-on application for
Microsoft Dynamics Entrepreneur.

Software Solution Test for Microsoft Dynamics Entrepreneur


All C/SIDE add-on applications for Microsoft Dynamics Entrepreneur have to pass a Software Solution
Test before it can be distributed and sold to customers. ISVs should familiarize themselves with the test
specifications before starting development to avoid issues and delays during the test process.

Security
Security is vitally important to Microsoft and its customers. Make sure that you develop and implement
your solution by adhering to industry-standard security technology. You can get an overview of the
Microsoft Dynamics NAV Security Model (which also applies to Microsoft Dynamics Entrepreneur) in
Chapter 3 of the Application Designer’s Guide. You can also read the Microsoft Dynamics NAV Security
Hardening Guide. Both documents are available on the Microsoft Dynamics NAV Developer
Documentation referenced in the More information section.
When designing applications, consider helping to secure the data by using firewalls and encryption. This
involves building new security roles or modifying existing ones for Microsoft Dynamics Entrepreneur.
For general background information and to stay current about issues regarding security in application
development, visit MSDN and review the security documentation regularly.
For more background information, read ―Writing Secure Code, Second Edition‖ by Michael Howard and
David LeBlanc. The safety of your development code is another important consideration. You need to
control who has access to the code in the development cycle, and make sure changes are controlled. A
source control tool will help you manage your code.
Developing an external control may have some upgrade benefits, because you link this functionality into
the existing C/SIDE environment with C/AL code. The control is easy to upgrade and the control might
not need to change in a new version. You must also consider controlling the security of the interface,
because forms developed in C/SIDE will enhance security by using the application security that is
provided in Microsoft Dynamics Entrepreneur. If you develop externally in .NET Framework, then you can
utilize authentication provided by the Windows operating system.

Setting Up a Local Development Machine


Setting up a new local development machine is important for consistency among the developers on a
team. Follow these guidelines to set up a new machine for developers:
 Install the development tools. For a C/SIDE developer, this involves installing a Microsoft
Dynamics Entrepreneur client. Because of language issues, you should develop with a W1 client
of a client that uses an ENU fin.stx file. The client will need a copy of a developer’s license. They
may also need to install the Microsoft Dynamics NAV Developer’s Toolkit, so they can use some
of the features, such as Source Analysis. You may also need other third-party development tools,
for example, a popular code compare tool like Araxis Merge.
 Create an account in the relevant systems. Some examples are Source Code Control, Support
System, and Team Shares.
 Set the regional settings to the development language. When developing in C/SIDE, we
recommend developing in U.S. English by using a decimal separator set to "." (period). This

15

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


setting can be viewed and modified in the Regional Options applet in your system's Control
Panel. C/SIDE properties that expect a decimal number, such as InitValue, may not be interpreted
correctly if the wrong decimal separator is used.
 Develop in U.S. English. Then use the multilanguage tools to translate the application to the
target language.

Developing with C/SIDE Objects


The Microsoft Dynamics NAV Developer and Installation Guides available on MSDN are the best place to
get an introduction to developing and working with the objects in C/SIDE. The following information
about some of the objects can help you develop your vertical functionality.

Tables
Modifying the data model is one of the main tasks that you will undertake to implement your vertical
functionality. You do this by adding new tables in your add-on number range, or by modifying existing
tables in the number range below 50,000. Follow best practices ISVs use to minimize upgrades and
migration and simplify development. Best practices include but are not limited to:
 Avoid copying existing tables to implement new functionality. If you don't, you will have to
modify forms, reports, and codeunits that reference this table to make sure that the application
continues to function.
 Consider normalizing the data model for additional information for your vertical solution.
You can store data in an additional table. This enables you to add one field to the parent table
with a reference to your vertical table, which minimizes the impact on the standard Microsoft
Dynamics NAV table. This can be used in conjunction with developing smaller componentized
forms. While this practice works well with master file-type information, it may not work with
journal-type tables, as you might have to change additional code in posting routines.
 When working with OptionString properties on fields, leave room for Microsoft to add
new options in future releases. This will minimize the upgrade work that you will have to do if
there is a clash. You will have to move your option and update data, which can be a difficult task.
Consider this OptionString :
Red,Yellow,Brown
If you add a new option:
Red,Yellow,Brown,Pink
Then and Microsoft adds this new string:
Red,Yellow,Brown,Blue
Then the Microsoft string will override your data. You should add your string with
spaces.
Red,Yellow,Brown,,,,,,,,,,,,,,,,,,,,,Pink
The amount of spaces you add is up to you and how volatile the field could be, perhaps
somewhere around 10–20.
 When developing the data model, consider the needs of keys and indexes and the number and
users of fields. Refer to the existing documentation, such as the Performance Troubleshooting
Guide and SQL Server Resource Kit, for guidance about performance of tables and database
design.

16

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Forms
The C/SIDE development environment provides an excellent form designer for rapidly developing a UI
for your application. The forms that you develop in the C/SIDE environment are executed in the
Microsoft Dynamics Entrepreneur client that runs on user workstations.
You will have to build a number of forms for your vertical solution. Make sure to consider the
development of forms, because these make up the UI that all users will interact with on a daily basis
when using the Microsoft Dynamics Entrepreneur client. Microsoft Dynamics is moving toward
implementing role-based UIs to enable users to interact with the business solution in a way more
intuitive to their job.
When you are developing the forms and working with program management to specify functionality,
make sure you consider the roles usage of the form that needs to be developed. One design
consideration is to develop in smaller, more modular forms.
Today, when forms are developed, they contain information for more than one person. For example,
form 42 from the Sales Order entry form is used primarily by the person entering data in sales orders.
However, account managers and financial controllers also use this form for information. Consider
building a separate form for these other t roles and presenting the information in a summarized view
that could then be used in other places within the business application. There are numerous benefits to
developing smaller, componentized forms.
 Reuse smaller, componentized forms in more places within the application. For example, in
the current version of C/SIDE, you might consider developing functionality in sub-forms for the
different roles, and then bring them together where needed on the main forms.
 Minimize your upgrade efforts. By building smaller, componentized forms, you will have to
review them at upgrade time. However, you can simplify the upgrade work by upgrading the
parts independently, which eliminates the complexity of having to consider the interaction
between the information.
The main point you need to consider when developing a vertical solution is the maintenance of your
forms. If you modify existing forms below the 50,000 number range, the forms you build may have to be
upgraded in service packs, hotfixes, and new product releases. Some of the best practices ISVs use to
maintain forms are:
 Consider copying complex forms to an object in your vertical ID range. This way you only
have to change a menu reference. You will have to evaluate copying a form on a case-by-case
basis depending on the functionality you are developing. You can use the Source Analysis
features in the Microsoft Dynamics NAV Developer’s Toolkit to check for references to the form
to understand other objects that need to be changed. If the work that is needed to change
references outweighs the work minimized for upgrading, then make the changes to the original
form.
 Consider hiding controls instead of removing them from forms. This will make it easier to
view changes when you look at your old and changed object in a compare tool. However, if the
control is in the middle of a group of controls, then the UI may not look consistent.
 When working with PageNames property on forms, leave room for Microsoft to add new
names in future releases. This will minimize the upgrade work if there is a conflict. As described
previously in the OptionString property on fields, you should add additional space. For example:

General,Communication,Invoicing,,,,,,,,,,,MyNewPage

17

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


You cannot create new visual form controls, such as tree controls in Microsoft Dynamics Entrepreneur.
You can only use the existing sixteen controls provided for you in the C/SIDE environment. These are
excellent for creating a form that allows the user to interact with the business application. There are
circumstances in which the existing controls might not be enough for the interface that you need to
provide for the role you are developing. In that case, you can add new complex UI features with external
controls or applications. You can develop these features with standard development tools such as Visual
Studio.
These controls can be either component object model (COM) or .NET-based controls. The .NET
components will have to be wrapped as a COM component to be executed by the COM interloper layer
that is provided in C/SIDE. The COM interloper layer is provided when you reference a COM component
as a variable in C/AL code. If you do develop external to C/SIDE, you must consider the increased
requirements for installation, because you will have to make sure that the external control or component
is installed when the user needs this functionality.
Developing an external control may have some upgrade benefits, because you would be linking this
functionality into the existing C/SIDE environment with C/AL code. These external controls are easy to
upgrade, and the control might not have to change in a new version. You must also consider controlling
the security of the interface as much as possible, because forms developed in C/SIDE can be made more
secure with the application security provided in Microsoft Dynamics Entrepreneur. If you develop
externally in .NET Framework, then you can make use of authentication provided by the Windows
operating system.
Developing a control externally also offers other advantages, such as the ability to include more of the
business application in other applications like Microsoft Office system. Perhaps the role you are
developing doesn’t need to work in the Microsoft Dynamics Entrepreneur client, but instead prepares
sales quotes in Word. By developing externally to the C/SIDE environment, you can create a much better
experience for this particular user.

Reports
Reports are the objects used to print information from Microsoft Dynamics Entrepreneur. Reports can
also be used to process data to mimic a batch process engine. Some best practices ISVs use for reports
include:
 Consider copying when customizing reports. If you need to make complex customizations to
an existing report, consider copying the standard report to an object in your solutions object
number range. You will have to evaluate copying on a case-by-case basis, depending on the
functionality you are developing. You can use the Source Analysis features in the Microsoft
Dynamics NAV Developer’s Toolkit to check for references to the report, so you can understand
other objects that need to be changed. If the work that is needed to change references
outweighs the minimization of upgrade issues that could occur by copying the report, then you
should make the changes to the original report.
 Explore options for external reports. If you have external reporting needs, such as reports that
need to be executed by users that don’t have access to the Microsoft Dynamics Entrepreneur
client, consider using SQL Server Reporting Services for transactional type reports.
 Consider the C/AL business logic code you add to reports. Can the business logic be
separated and placed in a codeunit? Think of the report as the presentation system. By placing
the code in a codeunit, you make this code available to be called by other mechanisms. Perhaps
a report you write in SQL Server Reporting Services could make a call to the same business logic
through the Microsoft Dynamics NAV Application Server. Similary, if you develop an invoice
template in Word to give users an easier way to manipulate the layout of the invoice in a familiar

18

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


tool, you could access the same business logic in different report presentation situations. By
placing the business logic in a codeunit, you also can simplify report upgrades.

Dataports and XMLports


Dataports and XMLports enable you to import and export data into your vertical application. ISVs use
Dataports and XMLports to move data into and out of Microsoft Dynamics Entrepreneur. Dataports
enable you to work with traditional fixed format and delimited data, and XMLports enable you to work
with XML. You can use these ports to:
 Integrate with other lines of business solutions. Because you use C/AL code on a Dataport or
XMLport, you can use an XMLport to develop a standard import function. For example, if you are
developing for an industry that uses a specific line-of-business solution, for example, a billing
system running on another platform, you can use Dataports to bring this data into Microsoft
Dynamics Entrepreneur in a traditional batch manner. You can also use these objects to send
data to other applications. You can use tools like the Job Queue functionality running in a
Microsoft Dynamics Entrepreneur client to import and export on a scheduled basis or you can
trigger these with C/AL code.
 Create standard template migration tools. Develop with Dataports and XMLports to create
standard template data migration tools. Perhaps you are recoding a legacy vertical solution and
you are using Microsoft Dynamics Entrepreneur as the core ERP to that solution. You can
develop Dataports and XMLports to migrate the data from your legacy application.

Codeunits
The Application Designer’s Guide (found in the Microsoft Dynamics NAV Developer Documentation
referenced in the More information section) provides a great reference for developing C/AL code. Best
practices that ISVs use for codeunits include the following:
 When working with codeunits, avoid using code that will stop processes and wait for user
input. Functions like CONFIRM and STRMENU and other functions that halt the execution of
code should be carefully considered or avoided.
 When developing functions in objects, consider where the function will be used. If it is
only on an object, create it on the object. If you are not calling the function from other
objects, consider making the function local by changing the local property where the function is
defined. This means that the function can only be seen and called effectively in this object,
similar to when you make a private variable declaration in other programming languages. This
has the added advantage that if you know the function has to be changed, then there is only one
object that will need to be tested. If it is global, then you can see other code referencing the
function with a tool such as the Microsoft Dynamics NAV Developer’s Toolkit.
 Consider making a codeunit in your solution number range that contains your business
logic code. When the code needs to be referenced in standard codeunits, for example, 80 Sales-
Post, reference your codeunit with a variable, and pass the relevant variables that you need.
Remember to pass as a Ref variable, which enables you to minimize the code that you have to
insert into standard code. Using this method also enables you to work on your codeunit as a
black box and change it as needed. If the change is an upgrade, you will only have to merge the
reference to the new version. Where there are multiple changes needed in different parts of a
posting codeunit, consider creating different functions in a new codeunit, and then just reference
functions in the posting code. In these cases, ensure that you document your code effectively to
make it easier for a support engineer to read—they might have to jump around a lot and could
lose the flow of your code.

19

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


 Do you have business logic code in your vertical solution that has been developed in the
.NET environment? If so, you could register your .NET assembly as a COM object. After the
assembly is registered, it can be called from within C/AL code through COM Interop. Consider
your needs for doing this; perhaps access to external applications that are simpler to develop
with Visual Studio and the .NET Framework is sufficient. You can use this approach with the
Microsoft Dynamics NAV Server.
 When developing codeunits, make sure the ability to call the codeunit is clearly specified.
This way, other developers know what the potential results will be if they pass within the
specified parameters. When developing your code, consider a service-oriented architecture
(SOA) to support integration and consolidation activities.
 Make sure you place all text into Text Constants. This will enable you to translate your
application to a different language.
 Always develop your C/AL code in U.S. English. Make sure variables are created as per naming
conventions with U.S. English names.

Menu System
The menu system is a way for users to find the functionality you’ve developed. When working with the
menu system, consider the following best practices:
 If you are adding a new set of functionality, create a new menu to appear on the list of functional
areas such as Purchase and Warehouse.
 If your solution is extending an existing standard Microsoft Dynamics Entrepreneur module,
make sure you add new menu items to the existing menu structure.
 To effectively operate your vertical solution, consider changing the menu structure to one that is
better-suited to user roles in your vertical industry.

Using Comments
Regardless of your programming skills, you cannot work on a number of products and remember all the
reasons for code changes. You must document them. Commenting code is a great help for people who
may have to continue to develop and support your code.
As a best practice, avoid too many inline comments in your code; this will clutter it. In your comments,
make sure to add a reference number and the additional details in the documentation trigger. The
reference number should have some meaning relating back to a design specification or a support
tracking number from your support system. When you insert code or remove code, add a marker.

20

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


WITH SalesHeader DO BEGIN
TESTFIELD("Document Type");
TESTFIELD("Sell-to Customer No.");
TESTFIELD("Bill-to Customer No.");
TESTFIELD("Posting Date");

//>> XJZ1.0.1.2
TESTFIELD("Document Date");
//<< XJZ1.0.1.2

IF GenJnlCheckLine.DateNotAllowed("Posting Date") THEN


FIELDERROR("Posting Date",Text045);

In this code example, a new line of code is inserted. In the documentation trigger, you add the reference
number XJZ1.01.2 and short additional comments. The build containing the information should exist in
your design specifications or support system. Make sure the same information is in both places.
When you change existing code to implement your vertical functionality, avoid deleting standard code.
Use comments to block the code out. This will appear in the source code compare tools to make it easier
to identify what you have done.

WITH SalesHeader DO BEGIN


TESTFIELD("Document Type");
TESTFIELD("Sell-to Customer No.");
TESTFIELD("Bill-to Customer No.");
TESTFIELD("Posting Date");

//>> XJZ1.0.1.3
//TESTFIELD("Document Date");
//<< XJZ1.0.1.3

IF GenJnlCheckLine.DateNotAllowed("Posting Date") THEN


FIELDERROR("Posting Date",Text045);

Also, make sure that you use the comments features of your source control application. For example,
Microsoft Visual SourceSafe® enables you to add comments when you check out and check in your
updated object. This enables you to use the reporting functionality in the Source Control application to
get an overview of changes.

21

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Demonstration Data
Demonstration data is important to product shipping. It gives the sales team and channel partners
something to use to demonstrate your solution. It can also be used to give consistency and meaning to
training materials.
You should have an automated build process to populate your demo data. Typically, you will be building
on the standard demo data that is shipped with Microsoft Dynamics Entrepreneur, so be aware of the
following:
 Make sure your data is relevant. The demo data you’re providing should be relevant to the
vertical industry that you are targeting.
 Produce a good quality demo. There should be enough data to demonstrate a valid scenario
without using real company names. There must also be enough demo data available on
transactions to make sure you can show the full capabilities of reports. This data should be
accurate, and when producing a demo for a sales presentation, make sure balances are correct,
process flows work correctly, and data relationships are valid.
 Translate your demo data. This provides many advantages in the sales process and for training
purposes. It also helps customers see your commitment to their market.

Internationalization
In your business plan, you have identified the geographic markets you would like to address with your
vertical solutions. Taking the solution to those markets could require localization.
Does the functionality in your vertical solution need to be localized? You have the domain knowledge, so
you are best qualified to answer this question, as it will vary between different functionality in different
industries. If the market you are going into has more government regulations than the countries you
already work in, it might require extra localization.

Working with Regional Databases


Localized versions of Microsoft Dynamics Entrepreneur are based on a number of regional versions.
These regional versions are based on a version developed by core development called the W1 version.
The regional versions are all based on the W1 versions. If you plan to take your solution into different
countries, you will have to base it on a regional version. This may enable you to develop once and then
target a number of countries.
If you plan to develop your vertical solution to be used in a number of countries that are covered by a
number of different regional databases, you can first develop in the W1 database. Then you can merge
your vertical functionality into a regional database and perform subsequent testing.

Working with Languages


If you decide to distribute to new markets, you must consider many critical aspects about language. For
example, Europe, Asia, and Latin America will not accept a product that is written only in English, because
the end user will have difficulty using it. You should always develop in U.S. English, and then have this
version translated.

Creating a New Language


If your target markets are not covered by a base language already shipped by Microsoft, you will need to
request help from Microsoft. The Microsoft Dynamics Entrepreneur client uses two files called FIN.ETX
(error texts) and FIN.STX (standard texts). These are sealed in the localization process by Microsoft and
determine the base system texts for the installation. To develop your solution for a specific market, you
will have to use the base client that contains the language you want. If the language files don’t exist, you
22

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


will need to work with Microsoft to create these files. Otherwise, your solution will be in the language
that you have translated, while the system and error texts will be in another language.
The Microsoft Dynamics Entrepreneur client provides the mechanism to work with languages. For more
information, refer to the Application Designer’s Guide found in the Microsoft Dynamics NAV Developer
Documentation referenced in the More information section.
If you are working with external controls developed in .NET, you will have to use the globalization
features of the .NET environment. If your application has a UI, you can provide the language as a
parameter in initialization so that it can be passed from the calling C/AL code.

Translations
Your vertical solution may require you to change the standard definition of an entity in Microsoft
Dynamics Entrepreneur—for example, changing Customers to Clients. To do this, you will need to take
steps to translate the application. Remember to translate online Help and training materials, so that your
customers are aware of the change.
Create a terminology list of words and their context that need to be changed. You will need to do this so
that when a new version of Microsoft Dynamics Entrepreneur arrives, you can translate the base
application for your needs.

Tools
The Microsoft Dynamics Entrepreneur client provides the tools you need to work with languages.
Generally, you will translate the complete application or at least the new objects that you have created
and modified for your vertical functionality.
To extract the translation texts from Microsoft Dynamics Entrepreneur, you can use the Translate features
in the Microsoft Dynamics Entrepreneur client. In the Microsoft Dynamics Entrepreneur client, you can
use the Object Designer to filter down to your objects. (On the Tools menu, point to Translate, and then
click Export.) This will give you the option to export the translation texts to a text file. You can then have
this file translated.
The Microsoft Dynamics NAV Localization Workbench (NLW), which is also applicable for Microsoft
Dynamics Entrepreneur, is provided on the Microsoft Dynamics NAV Developer Documentation
referenced in the More information section. The NLW enables you to create a project to translate your
captions to a new language. The input for the NLW is the Translate Export file that is created from the
Microsoft Dynamics Entrepreneur client. After you have used the NLW to translate the text, you can
export to the language you need.
The NLW will generate a file that you can then use to import back into Microsoft Dynamics Entrepreneur.
(On the Tools menu, point to Translate, and then click Import.) Make sure you select the objects to be
updated before executing this menu.
Be careful when you import a translation back into Microsoft Dynamics Entrepreneur. All the objects that
you have selected will have the modified flag, date, and time stamps set to the import time. You can
work around this by exporting the object attributes first.

License Issues
When developing your localizations, you will need a license file that can access the different regional
databases. You also can make a special request to the Microsoft Operations Center to get a different
license file to use. To avoid delays, make sure you have a license before you need to start using it.

23

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Source Code Management, Version Control
An important building block in the build process is an efficient source code management system.
Managing objects involves discipline to make sure all of the required code is kept protected. When
working in C/SIDE, you can recover changes to an object after it’s saved. If you didn’t mean to make a
change, you will have to export from an original database and import it into your project database. If you
employ some basic management practices, it could save time later in development and help ensure your
changes are incorporated.
What do you put in the source code management tool? You put in everything related to the current
product release. This includes product documentation, specification documents, and anything related to
developing and shipping the product. By including all these items, you can use the versioning and
archiving features to store a complete release at a specific point in time.
Some code management practices will also help if you have multiple developers working on a project.
There are two ways to develop in teams: on a database stored centrally and on a local database. You
have to employ a lot of discipline for both methods to avoid different members of the team overwriting
changes that other team members make. To avoid these issues, you should use a source control system.
A source control system includes these advantages:
 There is a single place where the objects are managed and controlled.
 One developer can work on one object at a time, which helps avoid the loss of changes when
multiple Microsoft Dynamics Entrepreneur developers work on a shared database.
 Object changes that are checked back into the source control can be compared to the base
version to see what has changed.
 If incorrect code changes are checked in, then a previous version of the object can be recovered.
 All object changes are logged with the developer who made the change, so that you can extract
management reports.
 If there is a variation of your ISV project that needs to be created for testing and prototyping,
you can branch the source project in the source control tool.
As most Microsoft Dynamics Entrepreneur ISV projects involve smaller teams with 1–20 developers, you
can use Visual SourceSafe (VSS) 6.0 as your source control system. The following guidelines have been
written for VSS:
1. Create a database with the Microsoft Dynamics Entrepreneur base version. This version includes
any service packs and hotfixes. This will represent the base version for your development project.
If hotfixes are released after you build your base version, you will have to merge the hotfix into
your project.
2. From this database, export all the objects in FOB format. You can then retrieve an original
version of an object if you need it. The format is also necessary because it will form a base
version with which to compare builds. You can use this base version to create changes to
documents when you ship the product. Call this file AllObjects.fob. You also check this file into
your source control system to use in the daily build process.
3. From this database, export all the objects in TXT format. This will enable you to check these
objects into your source control management application. When you export all your objects, you
will have a very large TXT file. To check this file into your source control management
application, you should work with individual objects. It will take you a long time to import and
export from Microsoft Dynamics Entrepreneur to set up your source control project. In the VSS
tools folder, you will find the separate utility. This will enable you to split the large TXT file into
individual TXT files for each object in the database. You will then check in each of the individual
24

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


objects. When the developers start working with the product, they will check in and check out
individual objects. This will enable the team manager to see who is currently using an object. The
team manager can also use the functionality of the source control application to see what has
changed when developers check in the objects.
4. Build a local development database with a backup version of the base version.
5. Use the source control application to check in and check out TXT objects to a local checkout
folder.
6. Use the Microsoft Dynamics NAV client to import and export Microsoft Dynamics Entrepreneur
objects in TXT format from the checkout folder.
7. Develop with C/SIDE on the local database by using the Microsoft Dynamics Entrepreneur client.

Daily Build
You should plan to create a build daily or, depending on the size of your project, at least two to three
times per week. The purpose of the daily build is to make sure that development is on track. If you are
not doing a daily build, it is difficult to test, and testing is the most important part of your development
cycle.
There are a number of steps to setting up a daily build process. Some may be manual, but to reduce
administrative tasks, you can automate most of the processes and start before leaving in the evening.
Use the following steps to set up a daily build:
1. Build an empty database on SQL Server. You can automate this process by using the Microsoft
Dynamics Entrepreneur client and building an empty database on SQL Server, for example, a
database named ―BUILD.‖ Take a backup of this database and store it on the server to use when
creating the daily build. You can restore the database by using a command line statement with
the Microsoft SQL Server osql utility. Alternatively, you can use the Microsoft Dynamics
Entrepreneur Client with a macro utility to create a new database on SQL Server.
2. Export all objects from the Source Control system. With VSS, you can automate exporting
with a command line using SS.exe. The command line looks like this: ss Get $/Entrepreneur –R.
The project name here is ―Entrepreneur.‖ By executing the command, you can extract the latest
version of all the objects from VSS as individual objects. The command will also export the
AllObjects.fob file that you create during the setup in VSS.
3. Create an individual TXT file for each object. You can make the import process simpler by
joining these into one big TXT file; for example, the command line copy *.txt AllObjects.txt can
run in the folder with the TXT files extracted from VSS.
4. Use the Microsoft Dynamics Entrepreneur client to import the AllObjets.fob file. Open the
Object Designer, click File, click Import all, and then locate the AllObjects.fob file. You need to
use one of these methods because you cannot import the TXT files straight into the empty
Microsoft Dynamics Entrepreneur database; you do not have insert permissions on your license
file to create objects below 50,000.
5. Use the same import procedure with the Microsoft Dynamics Entrepreneur client.
Importing the AllObjects.txt file in TXT format will force overwrite of the object, so be careful that
you are importing to the correct database.
6. The objects will now all be in an uncompiled state. Compile the objects. You can use a macro
utility to automate this process. You will have to manage and compile errors manually. Also the
machine on which you run the compile will have to have access to all the COM objects called by
the C/AL code. If you can’t set up a machine that includes these, import the already compiled

25

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


FOB object into the database. You can create a subset of the FOB objects that you need, and
then import this subset before you compile the objects.
7. Update your version list. You can automate this process by using a macro that imports a FOB
to update the version list.
8. Update the date and time.
9. Build the demo data. Use the demo data tool that you have created to update the
demonstration data. You can automate the update with a macro utility that imports and runs an
FOB file.
10. Move the finished database to the test environment. The build process is finished, and is now
ready for testing.

Generating Demonstration Data


Like Microsoft, most ISV partners have a tool that generates demonstration data. This enables the data to
be regenerated at any time. You can also translate the demo tool data into another language. Use these
best practices when creating demonstration data:
 Only generate data that populates master file details and the journal tables. Then use
posting codeunits to post the transactions. By posting transactions, you can set the posting data
to update the demo data constantly.
 Back up the standard demonstration data. Use the backup features of Microsoft Dynamics
Entrepreneur to do this. Do not backup objects, so that if you use this backup in the build
process you will not overwrite your new developments.

Database Consistency
If you are shipping a database to your customers or resellers to use in training or demo situations, make
sure it is a quality product by running the database test tools. You will find these tools in the Microsoft
Dynamics Entrepreneur client (On the File menu, point to Database, and then click Test). If you have
created demo data, make sure that all the tests pass, so that if a customer runs these in a pre-sales demo
situation the test will run without error.

Create a Version List Text File


You can create a version list text file with a Dataport. This is a simple but important tool that can save a
lot of time, especially when working with languages. Importing and exporting languages will set the date
and time stamps of the objects at the time you import and export. This will cause your channel partners
some confusion when they review what has changed, because a source compare utility will show that all
the objects have changed.
By using a Dataport, you also can maintain your version lists with a spreadsheet, and in this way add to
your documentation.
1. Create a new Dataport.
2. Add the Object table as the DataItem.
3. Add the Dataport fields: Type, ID, Name, Modified, Date, Time, and Version List.
4. Add a filter to the DataItem. Do this by changing the DataItemTableView property. Add the Table
Filter as Type=FILTER(<>TableData). This is because the Object table also stores information
about the data and you don’t want to change this.
5. Run the Dataport as needed to import and export the version list.

26

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


A sample object is provided with the Microsoft Dynamics NAV Developer’s Toolkit in FOB format. Locate
the ExportObjectDetails.fob.

Date and Time on Objects


During the build process, you should update the date and time stamps on your objects for consistency.
You should also strip the date and time on objects before checking in the TXT object to your source
control tool.
You can update the date and time stamps with C/AL code by using the Object table. A sample piece of
code is provided in the tool kit as an FOB object called Create Time and Modified.fob.

Export Objects in TXT or FOB Format


For more information about exporting objects in TXT and FOB format, refer to the Application
Developers Guide.
To export all objects as a TXT format:
1. In the Microsoft Dynamics Entrepreneur client, press SHIFT+F12 or click Tools, and then click
Object Designer to open the Object Designer.
2. Select All Objects.
3. In the Object Designer, press CTRL+A or click Edit, and then click Select All.
4. On the File menu, select Export. Make sure the Type is Text Format (*.txt).
To export all objects as an FOB format:
1. In the Microsoft Dynamics Entrepreneur client, press SHIFT+F12 or click Tools, and then click
Object Designer.
2. Click All Objects.
3. In the Object Designer, press CTRL+A or click Edit, and then click Select All.
4. On the File menu, click Export. Make sure the Type is Navision Object Format (*.fob).

Local Development or Server Development


Choosing between local development or server development will depend on how big your development
team is and where they are physically located. If your team is within the same local area network, using a
source control system and letting developers work locally has a number of advantages. They can be
mobile, meaning that they can take their work with them and work from a remote location. Multiple
developers are not likely to overwrite each other’s code, because overwriting will be controlled by the
source control system. Development with a database on a shared server is difficult to manage with
multiple developers, because there is no functionality in C/SIDE to lock an object while it is being
developed. This could result in developers overwriting each other’s objects as they develop, causing
confusion and creating downtime to recover the missing code.

Version Numbering
Version numbering is about managing the version of your product so that you can keep track of it. If you
know the version, developers and support staff can communicate issues; sales and marketing staff know
what features are included in the version they’re selling, and partners know what version they need.
Microsoft Dynamics Entrepreneur provides a field in the Object Designer that enables you to update the
version list. This is a simple text field that can give your channel partners and support staff a simple way
to identify the version of the object deployed. The version lists should be maintained as described in the
Microsoft Dynamics Entrepreneur 2008 Developer Guidelines referenced in the More information section.
27

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR


Create a three-letter prefix for your application, and then append this prefix to the objects that you
modify in the development process. That way, if you update the object in a service pack update, it
appears in the version list with an additional number sequence. If you update the object during a hotfix,
add an additional number.

Technical Communications
Documentation is your means of communicating what your solution does and how to use and maintain
it. The following documentation provides different functions that are critical to understanding the
product.
 User manuals are important for end users to understand the functionality of your solution.
These are also useful to enable channel partners or end users to train themselves on the
functionality.
 White papers describe a particular concept or a piece of functionality in more detail. You can
use marketing white papers in the sales process to provide a simplified description of a complex
concept or technology. You can also have technical white papers that provide a very detailed
examination of the topic concept.
 Online Help provides the end user with easy access to descriptions of the functionality they are
currently using. The end user knows that F1 is a button they can always press to get Help. You
can extend and develop the online Help for your vertical solution by adding an extra Help topic.
Tools are provided on the Microsoft Dynamics NAV Developer Documentation referenced in the
More Information section, along with an Online Help Guide, for creating Microsoft Dynamics
Entrepreneur online Help. Adding online Help gives your solution a professional, packaged feel,
and it adds value for the end user.
 Development documentation is also important. The source control system will enable you to
control changes to your development. Make sure you use the comments features in the source
control program to document why code has changed. This is an important tool because some
government regulations, for example, Sarbanes-Oxley, are starting to demand a high level of
tracking for why code has changed in development and who has changed it. At minimum, you
need to document where you have changed the base Microsoft Dynamics Entrepreneur, so that
adjustments in help, training, and implementation material can be developed.

Release Documentation
When you ship your business solution, you should also provide documentation. That documentation
should contain at least:
 Changes documents that enable customer and partners to see what has changed in the product
release.
 Product release documentation. This documentation might include fact sheets, data sheets,
product documentation, or training materials that describe the business solution in greater
detail.

28

DEVELOPING ISV SOLUTIONS FOR MICROSOFT DYNAMICS ENTREPRENEUR

Das könnte Ihnen auch gefallen