Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a Chunk (cnk) file

Dexterity Techniques

How to create a Chunk (cnk) file

by  winthropdc  Posted    (Edited  )
How to create a Chunk (cnk) file
================================

This tip shows you how to use Dexterity to create a Chunk (.cnk) file. A Chunk file is a self-installing data dictionary file that, once installed, will create a dictionary executed by the Dexterity runtime. A Chunk file is used to distribute customizations and third-party products to a customerÆs site. These customizations can seamlessly add functionality to Microsoft Business SolutionsûGreat Plains or modify existing functionality in the application.

What Is Dexterity?
------------------

For those of you not familiar with Dexterity, Microsoft originally designed this tool to enable developers to create the Microsoft Great Plains solutions. Dexterity is ideal for creating transaction-based business applications, such as accounting and business management products. By using Dexterity to create applications that integrate with Microsoft Great Plains Professional, Microsoft Great Plains Standard, and Microsoft Business Solutions Small Business Financials North America Edition, you can create more powerful solutions tailored to the industries in which you have expertise.

In addition, Dexterity provides you with the complete set of components used to create Microsoft Great Plains Professional, Microsoft Great Plains Standard, and Microsoft Small Business Financials, including a forms builder, a database manager, a report builder, a 4GL scripting language and debugger, and an embedded macro system.

You'll use the Dexterity IDE (Integrated Development Environment) to create, debug and test your customization. When you are ready to distribute your customization, you will use Dexterity Utilities to perform the steps to create the Chunk file. Dexterity Utilities can also perform a number of maintenance and reporting functions not normally needed during the development cycle.

The Dictionaries YouÆll Use
---------------------------

In this tip, youÆll also work with two dictionaries: the Development Dictionary and an Extracted Dictionary. The Development Dictionary is a renamed copy of the DYNAMICS.DIC file that also contains all the added or modified resources and code which you have developed.

An Extracted Dictionary is a dictionary that contains only the added or modified resources and code. It does not contain the rest of the DYNAMICS.DIC dictionary. An Extracted Dictionary is named for the fact that all its added forms, reports, and code are extracted from the Development Dictionary.

The Extracted Dictionary will also contain any modified forms and reports, which are transferred from the Development Dictionary. Modified forms and reports will become alternate forms and reports once the Chunk file is installed. The Chunk file itself is actually built from this Extracted Dictionary, which is created during the process that follows.

Getting Down to Business
------------------------

Before creating the chunk file, with your Development Dictionary open, you should Compile All by using the Toolbar button or the menu choice (Explorer -> Compile All) from within Dexterity. If you are using source code control (which is recommended), select Explorer -> Source Code -> Check In to ensure all resources are checked in. You should also select Explorer -> Source Code -> Update Index File to ensure that the IDs assigned to resources you create do not change values between builds. Close Dexterity when you are done.

I recommend that you use a macro to record the following set of steps. That way, you can replay the macro to re-create the Chunk file at any time.

To create a Chunk file, open Dexterity Utilities and perform the following steps:

1. Open the source dictionary using the Development Dictionary (File -> Open Source Dictionary).

2. From the Toolbar, select Utilities -> Extract to extract all resources with resource IDs greater than 22,000 (in other words, all third-party resources) into an Extracted Dictionary.

3. If you do not have any alternate forms and/or reports, skip to step 7. (Alternate forms and reports are original Microsoft Great Plains forms and reports that have been modified in your customization. Because their resource IDs are less than 22,000, they are not extracted with step 2. Therefore, moving alternate forms and reports to your Chunk file requires additional steps.

4. Open the destination dictionary using the Extracted Dictionary you created in step 2 (File -> Open Destination Dictionary).

5. From the Toolbar, use Transfer -> Dictionary Module to transfer any alternate forms and/or reports into the Extracted Dictionary.

6. Close the destination dictionary (File -> Close Destination Dictionary).

7. Close the source dictionary (File -> Close Source Dictionary).

8. Open the editable dictionary by using the Extracted Dictionary created in step 2 (File -> Open Editable Dictionary).

9. If you do not have any alternate forms and/or reports, skip to step 11.

10. From the Toolbar, go to Resources -> Series Resources. Check both the All Resource Types and All Series check boxes, and click Update. This will update the internal series resources lists to include the alternate forms and/or reports.

11. From the Toolbar, select Utilities -> Product Information. Enter the Product Name, Product ID (assigned to you by Microsoft Sales Operations in Fargo, North Dakota, United States), the names of the custom forms and reports dictionaries, and the compatibility information. Then click OK. Make sure the Set file is DYNAMICS.SET and the Dictionary is set to 0.

NOTE: To request a unique Product ID, either e-mail mbsorder@microsoft.com or create a service request from PartnerSource (http://www.microsoft.com/BusinessSolutions/partnersource.aspx) -> Pricing & Ordering -> New Service Request (this way you get an assigned incident number). Note that PartnerSource is a subscription service. In either case, you need to include your Authorized Phone Number or Account Number as well as the name and short description of your product.

12. Select Utilities -> Auto Chunk. Then use the Browse button to select the filename of the Chunk Dictionary; use an 8.3 format filename with the extension .cnk. Next select a module (I usually use 51, which was labeled as Dexterity in older versions), and enter your major, minor, and build numbers. I normally match my major and minor build numbers to the Microsoft Great Plains version I am working with, and I use the build number field for my own build number. You can use the Runtime_GetModuleInfo() command to retrieve this version information for an About window. Finally, select Total Compression to remove the source code from the final Chunk, and press OK.

13. Close the editable dictionary (File -> Close Editable Dictionary).

That's it. Once you record this sequence as a macro, it usually takes less than 5 to 10 seconds to run. You can also edit the macro with Microsoft Notepad to change the build number and any other details.



NOTE: All the information on this page is available in the Dexterity Training materials and the Integration Guide manual that ships with Dexterity as a PDF document.


David Musgrave [MSFT]
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top