Journal Entry Source Document Code and Descriptions in Microsoft Dynamics GP 2013 R2

8 Dec

Usually we cannot find the Source Document code’s descriptions, Most of the times Auditors is requesting  the full form of the Source Docucodes. Please find the below list of JE Source Document descriptions.

SOURCE CODE SOURCE CODE DESCRIPTION
GJ General Journal
PMAPY Payables Apply Doc
PMCHK Computer Checks
PMPAY Payment Entry
PMTRX Payables Trx Entry
PMVPY Void Historical Trx
PMVVR Void Open Trx
SJ Receivables Transaction Entry
CRJ Cash Receipts
APL Apply Receivables Documents
RMJ Receivables Posted Trx Maint
COM Transfer Commissions
UPRCC Computer Checks
UPRMC Manual Checks
UPRME Month-End Reports
UPRPE Period-End Reports
UPRQE Quarter-End Reports
UPRVC Void Checks
IVADJ Inventory Transactions
IVTFR Inventory Transfers
INVCE Invoice Journal
CMDEP Bank Deposits
CMTRX Bank Transactions
CMADJ Bank Reconcile Adj
CMXFR Bank Transfers
POPVT Purchasing Voided Trx
RECVG Receivings Trx Entry
RECVT Receivings Voided Trx
EDTPO Edit PO Status
POIVC Purchasing Invoice Entry
PVIVC Voided Purchase Invoice
PORET Returns Trx Entry
BMASM Bill of Materials Assembly
MC Currency Revaluation
FAADD Asset Created
FAADJ Adjustment
FACHG Asset Changed
FACHG-R Change resulting from a reset
FADEP Asset Depreciation
FADEP-O Asset Depreciation One Only
FADEP-R Depreciation result from reset
FADLT Asset Deleted
FADLT-U Asset Delete Undo
FAMCH_ADJ Mass Change from Adjustment
FAMCH-R Mass Change result from reset
FAMCH_ADJR Mass Change from reset for Adj
FAMDL Asset Mass Delete
FAMRT Asset Mass Retire
FAMXF Asset Mass Transfer
FAMXF-C Asset Mass Transfer Cost
FARET Asset Retire
FARET-P Asset Retire Partial
FARET-PU Asset Retire Partial Undo
FARET-U Asset Retire Undo
FASUM Asset Summarize
FAXFR Asset Transfer
FAXFR-C Asset Transfer Cost
FAXFR-P Asset Transfer Partial
FA Fixed Assets General Entry
CBTRF Bank Transfer
CBPAY CBM Payments
CBREC CBM Receipts
CBMPAY CBM MC Payment
CBMREC CBM MC Receipts
CBMATCH EBM Match Transaction
CBTRN EBM Transaction
PETTY CASH Petty Cash
SCCIA Service Call C-Parts Line Adj
SCIIA Service Call I-Parts Line Adj
SCRIA Service Call R-Parts Line Adj
SCRIT Service Call R-Parts Line Trsf
SCIIT Service Call Inventory Transf.
RMAIA RMA Inventory Adjustment
RMAIT RMA Inventory Transfer
RTVIA RTV Inventory Adjustment
RTVIT RTV Inventory Transfer
DPCIA Depot Inventory Adjustment
DPPIT Depot Inventory Transfer
GBJ General Budget Journal
PPPMT Purchasing Prepayments

How to Show Required field in Red color in Microsoft Dynamics GP

5 Oct

Within three steps we can achieve this

Goto the Microsoft Dynamics GP  >> User Preferences >>

RF1

Click on the User preferences

RF2

Then you can select Display button

RF3

You can select the Require fields font color and Font Styles

How to Create Data Types in Dexterity 11.0

24 May

Before you are going to create a data type, for best practice we can create the Workset for entire the resources in dexterity.

To Create a Workset follow the below steps.

Image

Once you click on the workset button, You will find the popup menu, click on  the Define Workset option

You will find the Define Worksets Window. Click on New button, you will find the  New Workset window will popup, Enter the Workset name in that.

Image

Click ok button , then new workset window will close, now click close button on define workset window.

Now you will click the workset tree button from the Resources. you will find the new workset Bank_Details.

Image

Now we have to work on the customization and save the all resource under the workset.

select the Bank_Details workset, click on the  New Resource Button form the tool bar in dexterity.

Image

Once you click on the Resource button you will get the popup menu

Image

Click on  the Data Type option.

Image

You can Create and Assign the format as well, click on the format browse button.

you will find the Format Lookup window. click on the New button or you can choose existing format, which is suitable for your requirement.

Image

In our case Bank ID should be Uppercase only, according to our requirement we can change the options in the format Definition window.

Then click on OK button then you will find the two resource under the workset.

 

Data Types in Dexterity

24 May

The control type is the defining characteristic of a data type. Dexterity has

over 20 control types; the most common are listed in below.

Check box

Image

Currency

Displays or stores a currency value.

Image

Date

Displays or stores a date value.

Image

Integer

Displays or stores a numeric value between -32,768 and 32,767.

Image

List box

Allows a user to choose one item from a list of items.

Image

Long integer

Displays or stores a numeric value between -2,147,483,648 and 2,147,483,647.

Image

Push button

Initiates an action.  

Image

Radio button

Provides at least two choices, only one of which can be selected at any instance. Always used with a radio group

Image

String

Displays or stores a text value up to 255 characters in length.

Image

Time

Displays or stores a time value.

Image

 

 

 

 

 

 

Finding Field Name and Table Name of custom table.

22 May

This post is specially for new comers for GP who find it difficult to know field names and table names of custom table when need to use in sql scripts for their add on application for Dynamics GP.

 

 Let take an example of Customer Maintenance. We have added a table evsTable and it’s two fields on a window.

Field 1 and Field 2.

Image

Now what you have to do is to open the window for whose field information you need, lets say we need to know in which table Field 1 will save data and what is the physical name of Field 1 to use in sql.

 Just focus on some other field and press Alt+F8 and save macro file anywhere.

Image

Now focus Field 1.

Again press Alt+F8.

 

Now go to the path where you have saved macro file and open it on notepad. You will find field name in it.

Image

Now to find the table name, go to below navigation and open a window.

Image

Select the product of your window, if you know the core good otherwise you have to use commonsense for window type, like customer means it must be sales.Image

Now you have table name as well as field information.

How to Display the Resource ID and Type in Microsoft Dexterity.

21 May

Basically when you are opening the Dexterity, we cannot find the resources ID and Type columns.

In Dexterity each and every resource having an unique ID.

Microsoft Dexterity will provide the Resource ID automatically when you create a new resource.

Apart from the Microsoft Dexterity standard resources will start from 22,001…..

When you open the dexterity first time you cannot find the resources ID and Type Columns.

Image

To display the Resource ID we need to add a statement in the Dex.ini file.

we can find the Dex.ini File in the below path.

C:\Program Files (x86)\Microsoft Dexterity\Dex 11.0\Data.

Image

Open the Dex.ini and add the below statement.

ShowResIDS=TRUE

Image

Save the file and close.

Now You will find the Resource ID and ResType two new columns in Dexterity.

Image

 

 

 

How to prepare a Chunk file in Microsoft Dynamics GP

16 May

Chunk Creation

  1. Open Dexterity Utilities
  2. Open Source Dictionary (Development Dictionary)

 2. Go to Utilities ->Extract

–          A Dictionary Name (eg. Extract.dic) should be given.

–          Extract.dic will have new forms and reports.

3.   Open Extract.dic as Destination Dictionary

4.   Go to Transfer ->Dictionary module

            – Modified GP Forms and Reports will be updated

5.  Close the Source and Destination Dictionary

6.  Open Extract.dic as Editable Dictionary

7.  Go to Utilities ->Product Information

                  -Enter the details of your product

8.   Go to Utilities

–          Auto Chunk

Merging Dictionaries

  1. Open Third Party dictionary as Source Dictionary
  2. Open Dynamics Dictionary as Destination Dictionary
  3. Go to Transfer -> Developer Update
  4. Rename the merged Dictionary

Updating Modified GP Resources in VSS

  1. Open Modified Dictionary as Source Dictionary
  2. Open Dictionary in VSS as Destination Dictionary
  3. Go to Transfer -> Dictionary Module

Add New Resources in VSS

  1. Export the resources as text file
  2. In VSS, those exported files should be imported

Mostly Asking Question in Dexterity

16 May

What is Dexterity?

Dexterity is a complete Integrated Development Environment (IDE) and the native language of Dynamics GP.

You can create the tightest, most seamless integrations using Dexterity.

Dexterity is powerful application development system for GP.

Capabilities of Dexterity

Access and manipulate all of the resources exposed by the Dynamics.dic file.

Create your own version of an existing window to use in place of the original Dynamics GP window (an Alternate Window).

Create new reports using the built-in report writer.

Create your own version of an existing report to use in place of the original Dynamics GP report (an Alternate Report).

Use the sanScript scripting language to create business logic that extends existing Dynamics GP functionality or creates wholly new functionality. Scripts can respond to user actions such as pushing a button, changing a field, or closing a window.

Use Dexterity triggers to watch for events such as opening a window or tabbing off a field. You can trigger off events in any customization written in Dexterity; you are not limited to just the Dynamics.dic file. When the trigger fires, it runs a procedure written by you.

Use the integrated debugging tools to debug your application, even when your application is running in multidictionary mode.

Provide access to end-user customization tools such as Report Writer, Modifier with VBA, and the Import utility.

Limitations of Dexterity

You cannot modify a form in a third-party dictionary, meaning you cannot modify a Dexterity window that lives in a dictionary other than the dynamics.dic file.

Dexterity does not support Unicode; so if you need support for Chinese, Japanese, and Korean hieroglyphs, you have a problem to solve

Dexterity cannot access fields added using the Modifier tool; therefore, you cannot attach sanScript code to those fields

Dexterity does not support dynamically loading images from a database

What are the Basic Development skills for the Dexterity Developers

Thorough knowledge of the sanScript scripting language

Experience working with the data model of Dynamics GP

Experience navigating the user interface of Dynamics GP

A proficiency in database design

An understanding of SQL Server

An understanding of SQL Server stored procedures

What are the tools built into Dexterity System?

1. Modifier with VBA

The Modifier is an interface customization tool that’s available to your application’s users

2. Report Writer

Report Writer is a report generation and customization tool available to your application’s users. This tool is similar to the Dexterity Report Writer, allowing users access to the same tools you use to create your application’s reports. Users can design reports based on original reports in your application, create copies of your original reports, change a report’s layout, add new functionality and add fields from multiple tables without affecting your original report.

3. Import Utility

The Import Utility is a tool that allows users to import data into your application. To do this, users create an import definition that maps data in a comma- or tab-delimited text file to the appropriate table in your application. The Import Utility uses an intuitive point-and-click method that allows data from a text file to be easily viewed and associated with fields from your application’s tables.

4. Resource Descriptions

The Resource Descriptions tool allows your users to view information about your application dictionary. This tool is designed to be used with a variety of products that enhance your application, including Dexterity, the Import Utility, the Report Writer and the Modifier

5. COM

Dexterity applications support Microsoft’s Component Object Model (COM). COM allows external applications like Microsoft’s Visual Basic or Borland Delphi to integrate with Dexterity-based applications through Automation.

 

6. MAPI

Dexterity supports Microsoft’s Mail Application Program Interface (MAPI). This allows you to mail reports to users also configured with a MAPI mailbox. The report will be sent as an attachment file to the mail destination you select in a MAPI dialog box.

What are the futures built into the Dexterity System ?

1.Network operation : Applications you create in Dexterity can be configured to operate across a variety of local area networks (LANs).

2. Multiuser operation: Dexterity supports multiple users accessing the same data at the same time. To accommodate this, Dexterity applications apply Optimistic Concurrency Control (OCC), a form of record locking that allows multiple users to work in the same tables and access the same records with minimal restrictions, while helping to ensure data integrity.

3. Database independence: Internally, Dexterity has a Data Management Subsystem that takes generic data requests and translates them into the specific calls needed to access data from the chosen database. You write your application independent of a specific database type. This allows your application to use any of the database types supported by Dexterity.

4. Client/server architecture: Dexterity applications can operate in a client/server environment, which allows you to separate data management tasks from processing and display tasks. By distributing these tasks between a client computer and a server computer, you optimize the use of your computing resources.

5. Process Server: Processes are distributed between client and server workstations using the Process Server. With the Process Server, you can send certain processes – such as posting data or printing reports.

6. Macro system: The Dexterity macro system allows your users to play and record macros, allowing your users to automate tasks throughout your application. The macro system is also used while testing your application.

7. Security: You can implement security in any Dexterity application. Security allows you to control exactly which forms, reports and tables users of your application can access.

8. Pathname support: Pathname support allows your application to store information in designated locations. Dexterity applications have built-in support for pathnames

 

 

 

How many types of Application in Dexterity?

Dexterity allows you to create two different types of applications.

Stand-alone applications: 

Stand-alone applications are created by Dexterity developers who want to develop applications that are independent of any other application.

 Although Dexterity was initially designed to create Microsoft Dynamics GP, Although Dexterity was initially designed to create Microsoft Dynamics GP, you can use Dexterity to develop stand-alone applications.

Many standard application features that are available to developers who create applications that integrate with Microsoft Dynamics GP, such as security, pathname support and online help.

Integrating applications:

The runtime engine included with Dexterity allows one or more dictionaries to function at the same time. This type of development environment is known as a multi dictionary environment. If your application integrates with Microsoft Dynamics GP, this feature allows your application to share resources with the Microsoft Dynamics GP system and function simultaneously. If you’re developing a stand-alone application, other dictionaries may operate simultaneously with your application, but not share resources.

Explain the Basic Development Process in Dexterity

1. Interface design:  Dexterity uses a combination of two different dictionary resources to establish your application interface.

Forms :Forms are used to organize windows, menus, tables and scripts into logical groups based upon the tasks being performed.

It’s important to remember that forms don’t appear directly in your application the same way a window or a report does.

Instead, they’re used to organize other resources that function together to complete a specific task, such as allowing a user to enter, maintain and print item records.

Although forms aren’t a visual element of your application’s interface, they provide the organization and structure that is the basis of how your application presents itself to the user.

A form groups together one or more windows, tables, menus and scripts, all of which work together to perform a specific task in your application

 

Windows: Windows are used to display fields and controls, such as push buttons, list boxes, scrolling windows and check boxes.

Windows allow users to interact with your application. They are the primary mechanism an application’s user will use to enter and manipulate data

Dexterity uses a WYSIWYG (what you see is what you get) window layout tool that allows you to quickly and easily create windows. This drawing environment allows you to quickly combine data-entry fields and window controls with static items such as lines, rectangles, pictures and text.

The layout window allows you to add a variety of window controls, such as push buttons, list boxes, multi-select list boxes, radio buttons, drop-down lists, scrolling windows and visual switches.

When you design windows using Dexterity, you don’t have to add native window controls, such as Windows resize controls. These controls are displayed automatically when Dexterity or the runtime engine is used to run your application

2. Database development

Dexterity uses a combination of dictionary resources to specify how data is stored in an application

Data types : Dexterity allows you to define a wide range of standard data types, including string, integer, currency, text and Boolean data types. A data type resource establishes a set of data storage and display instructions for fields that use that data type. Several fields can use the same data type.

Fields : Fields represent individual pieces of information in an application. Each field in an application uses a data type to specify its characteristics. Many fields can use the same data type. Fields can be used on windows and stored in tables. In the previous illustration, the Description, Customer Address and Company Name fields use the String30 data type.

Tables : When you define a table resource for your application, you group related field resources. This grouping is called a record. For instance, a record could include fields for a unique part number, a description, an item cost, selling price and a status. Together, these fields are used to create the Inventory Data table.

Currently, Dexterity supports three database managers that manage the tables in your application: Pervasive.SQL, c-tree Plus, and Microsoft SQL Server.

The Pervasive.SQL database manager is used by applications that access data on a local workstation or on a network. It is also used by applications that access data on servers running Pervasive.SQL for Windows NT.

The c-tree Plus database manager is used by applications that use c-tree Plus. It supports single-user operation and multiuser operation.

The SQL database manager supports access to Microsoft SQL Server 7.0 and Microsoft SQL Server 2000.

3. Report generation :

You will use the Dexterity Report Writer to create reports. The report layout allows you to design reports that present information from your application’s tables. Reports can be printed to a screen, printer or data file. Reports are composed of several sections, each representing an area on the report, such as the report header, report footer, and the main body.

Printing reports in your application is relatively easy. Simple sanScript commands allow you to print reports from objects such as menus or push buttons. For instance, the Inventory Report is printed using the run report sanScript statement

4. Scripting :

You will use sanScript, Dexterity’s scripting language, to add functionality and logic to your application. SanScript was developed specifically for Dexterity to provide functionality tailored to the requirements of graphical business applications. Unlike many traditional third-generation languages (such as Pascal or C) which require you to write long pieces of program code, sanScript is written in small segments, or scripts, that are attached to resources, such as fields, windows, forms and menus, in your application.

This script-based approach and sanScript’s English-like instructions are designed to make Dexterity applications easier to write than applications written with other languages. If you’ve had experience writing programs in other languages such as Pascal or BASIC, you will find sanScript very easy to learn.

What are the basic components required to the dexterity?

Depending on the installation options you selected when you installed Dexterity, some additional software, such as the Process Server, may have been installed as well. After you complete the Dexterity installation, the directory where you installed Dexterity will contain the following files

File

Description

DEX.EXE

The Dexterity application. You can double-click this file to launch Dexterity.

DEX.DIC

A dictionary used by the Dexterity and Dexterity Utilities applications.

RUNTIME.EXE

The runtime engine used to run your application dictionary in a runtime environment.

DEXUTILS.EXE

The Dexterity Utilities application. Although this software isn’t necessary for Dexterity to operate properly, it is necessary to perform dictionary maintenance.

DEXUTILS.DIC

A dictionary used by the Dexterity Utilities application.

IMPORT.CHM

The help file for the Import Utility.

RESDESC.CHM

The help file for the Resource Descriptions tool.

 

What are the database supports to the dexterity?

Dexterity supports 3 types of databases

c-tree Plus, Pervasive.SQL, and Microsoft SQL Server

Tables in dexterity

Tables store data generated and used by your application. When you create tables in Dexterity, you’ll use or define several elements required for tables to store and access information properly, such as fields, keys and table relationships. Before you create tables, be sure you’ve defined all the fields that you’ll be using to store information in the table.

If you’re creating applications that integrate with Microsoft Dynamics GP, be aware that Microsoft Dynamics GP table structures can’t be modified. Additional information must be stored separately in tables you add

Each table has a table name, display name, physical name, series, database type, table fields, keys, key options, segment options and table options. Use the Table Definition window to create tables.

Names:

Three names are required for each table.

 The table name is the name that is used in scripts to refer to the table. To make the name easier to use in scripts, you can use underscores (_) between parts of the name instead of spaces.

The display name is the name that appears when the name of the table is displayed on the screen in an application. This name is usually the same as the table name, but typically has spaces between parts of the name, rather than underscores.

The physical name is the name under which the table is stored by the operating system or database. By default, this name can be up to eight characters long and must conform to the operating system standards for the system running Dexterity. The appropriate extension, if required, is added automatically.

Example

Table Name

Customer_Data

Display Name

Customer Data

Physical Name

CUSTDATA

 

What is the table physical name length?

Dexterity allows you to enter table physical names up to 24 characters long.

we can updated this length Edit Menu –> Options–>Table Options –>Allow long physical Table Name.

 

Dexterity Limits

The following is a list of limits for the Dexterity development system.

Resource

Category

Limit

Arrays

Size

Up to 32,767 elements in an array.

Constants

Name

Cannot exceed 79 characters.

Dynamic Link Libraries (DLLs)

Parameters

You can pass a maximum of 255 parameters to a DLL.

Fields and data types

Composites

The maximum displayable length is 128 characters, including separator characters.

Standard composites can have up to 9 components.

Extended composites can have up to 128 components.

Button drop list

Drop down list

List box

Non-native list box

Visual switch

Can display a maximum of 32,767 items, each up to 79 characters long.

ListView

Maximum of 256 columns.

Can have up to 15 state images.

Can use up to 4 different overlay images at one time.

Multi-select list box

Can display a maximum of 32 items.

Can display a maximum of 79 characters per line.

Picture

Can store images having sizes up to 32,767 bytes.

Push button

One default button per window.

One cancel button per window.

String

Maximum keyable length is 255 characters.

Text

Can store a maximum of 32,000 characters.

Tree View

Can have up to 15 state images.

Can use up to 4 different overlay images at one time.

Forms

Total number

Maximum of 8191 forms per dictionary for Windows Help to be supported properly.

Global fields

Total number

Maximum of 8191 global fields per dictionary for Windows Help to be supported properly.

Global variables

Total size

There can be up to 64K of global variables.

Local fields

Total number per form

Maximum of 8191 local fields per form for Windows Help to be supported properly.

Menus

Displaying

Application can display a maximum of 15 menus at a time.

Messages

Length

The maximum length of the message, including all arguments in the message, is 255 characters.

Native pictures

Size

Native pictures can be up to 32,767 bytes.

Pictures

Size

Pictures in the picture library can be up to 32,767 bytes.

Procedures

Parameters

Can include a maximum of 255 parameters.

Up to 32K of parameters can be passed to and from a procedure.

Reports

Additional footers

Can have up to 15 additional footers.

Additional headers

Can have up to 15 additional headers.

Legends

Up to 255 legends can be added to a layout.

Text fields

Can display up to 10K of text on a report.

Scripts

run script statement

Can have a maximum of six levels of scripts started with the run script statement.

Local variables

Scripts can have up to 64K of local variable space.

Script size

Scripts can be up to approximately 24,000 characters long, including spaces and comments.

Static strings

Length

Can be up to 79 characters in length.

     

Tables

Keys

16 keys per table (Dexterity limit).

255 bytes per key (Dexterity limit).

Open tables

The maximum number of open tables is approximately 95.

Ranges

Only one range per table buffer.

Record size (Fixed-length portion)

Maximum of 4,088 bytes (approximately 4K) for Pervasive.SQL

Maximum of 32,767 bytes (32K) for c-tree.

Maximum of 8,060 bytes for SQL.

Record size (Variable-length portion)

32,767 bytes (32K) for Pervasive.SQL and c-tree.

Columns

255 columns per table (SQL limit).

Segments

16 segments per key (Dexterity limit).

119 segments per table for Pervasive.SQL.

384 segments per table for c-tree.

1024 segments per table for SQL.

Sorting

Dexterity can sort tables of up to 1,000,000 records.

Table access

One table buffer per table per form.

User-defined functions

Parameters

A maximum of 254 parameters, plus the return value.

Up to 32K of parameters can be passed to and from a user-defined function.

Virtual tables

Number of tables

Up to 16 standard tables as part of the virtual table.

Keys

16 keys for the virtual table.

Relationships

Only one main branch can have 1-to-many relationships.

Windows

Auto-linking

A window can be auto-linked to one table.

Objects per window

A window can contain up to 32,767 objects.

Selecting objects

You can select up to 200 objects in a window layout at one time.

Tool bar windows

Only one tool bar window can be open in an application at one time.

Total number

Maximum of 15 windows per form for Windows Help to be supported properly.

FORMS

After you create data types, fields and tables, you can begin setting up your application interface by first defining the forms and then the windows your application will use. Although forms and windows are stored as separate resources in the Dexterity development system, both work together to give structure to the tasks you’re designing your application to complete.

Form Elements

Name

Forms can be given any name, but if your application is stand-alone, there are two specially named forms that should be part of your application.

Series

When you create a form, you must specify the series the form is part of. The form series allows you to group related forms in a Dexterity application together using categories like Sales, Financial and System. For example, you could assign all of the forms used in an Inventory application to the Inventory series. You will use these series groupings when you use the Modifier or use Dexterity Utilities to perform dictionary maintenance activities

Attached tables

Tables must be attached to a form so the windows associated with the form will have access to the information in the tables. You must attach the tables to the form before you can reference the tables in scripts

Windows, menus, constants, commands and scripts

Each form can have windows, menus, constants and scripts associated with it

WINDOWS

After you create a form, you can create the windows that will be part of that form. A window is the main method of communication between the user and your Dexterity application. It consists of the visual area displayed on the screen that contains editable fields, interactive controls and static items such as text or pictures.

Window elements

Name : Two names are required for the window. The window name is used in scripts to refer to the window. Window names are easier to use in scripts when they have underscores (_) between parts of the name instead of spaces.

Window Types:  The type of window you create is specified by the WindowType property in the Properties window. Dexterity allows you to choose from seven window types: primary, modal dialog, modeless dialog, lookup, wizard, palette and toolbar

1.Primary windows are the most common type of window and appear with all operating system controls, such as close boxes and minimize controls.

2. Modal dialogs don’t contain any operating system controls and can’t be resized. These windows can be used when you require the user to complete an action in the window before closing the window.

3. Palette windows can be used as a device for navigation throughout your application. Palette windows are similar to the tear-off menus found in other applications. Palettes are used to group windows or tasks that perform similar functions, such as windows you use to maintain inventory items.

Reports

Reports allow you to retrieve data from your application’s tables and present it to users in an organized manner. A report can be as simple as a mailing list or as complex as a year-end account reconciliation. It can be based on data in a single table or in multiple tables.

Dexterity allows you create two different types of reports: graphics reports and text reports. Unless otherwise specified in the Report Definition window, all reports created with the Report Writer are graphics reports

San scripting language

 

General syntax

SanScript is a relatively easy language to learn, but you must follow some basic rules when you write scripts.

  • SanScript is case-sensitive, as are names of fields, windows, forms, menus and other resources. All keywords in sanScript must be lowercase.
  • Each statement in a script must end with a semi-colon. Statements can span multiple lines.
  • Comments can appear anywhere in a script. They must be bounded by braces – { } – and can span multiple lines.
  • If a script has parameters or local variables, these must be declared at the beginning of the script before any other lines in the script.
  • Each script must be less than 24,000 characters in length, including spaces and comments.

Data types in sanScript

Storage type

Description

Control types

Boolean

A value of either true or false.

Boolean

Check box

Currency

A currency value in the range [-99,999,999,999,999.99999 to 99,999,999,999,999.99999]. The decimal point is implied in the number, but not stored. For display purposes, currency values are limited to 14 digits to the left of the decimal and 5 digits to the right.

Currency

Integer

An integral number in the range

[-32768 to 32767].

Button drop list

Drop-down list

Group box

Integer

List box

Non-native list box

Progress indicator

Visual switch

Long

An integral number in the range [–2,147,483,648 to 2,147,483,647].

Long integer

String

A sequence of up to 255 characters.

Combo box

String

Text

A sequence of up to 32,000 characters.

Text

Date

Date based upon the Julian calendar.

Date

Time

Time based on the 24-hour standard.

Time

DateTime

A combined date and time value used for COM integrations.

None

Variable Currency

A currency value with up to 23 digits. Up to 15 digits of the number can be used for the decimal portion.

Currency (variable

 

Variables

Variables allow an application to temporarily store values used by the application. Dexterity has two types of variables: local variables and global variables.

Local variables

Local variables are specific to a single script and are active only while the script is running.

local integer number_of_dozen;
 
number_of_dozen = 'Quantity' / 12;

Global variables

Global variables are active the entire time a Dexterity application is open, so they’re available to any script in the application dictionary, at any time. Global variables are used to store information that affects the entire application

if Printing_Status of globals = “Yes” then

    run report Customer_List;

else

    warning “Printing is currently disabled. Try again later.”;

end if;

Operators

This section lists the operators supported in sanScript. Examples show how each operator is used in the different types of expressions

Operator

Description

Example

unary minus (-)

In numeric expressions, the unary minus operator (-) indicates a negative value.

neg_val = –10;

addition (+)

In numeric expressions, the result is the sum of the two values.

total = subtotal + 5;

 

In string expressions, the result is the concatenation of the first and second strings.

name = “Steve ” + “Jones”;

 

In date expressions, a numeric quantity may be added to a date to form a new date. The numeric value is treated as a number of days.

due_date = sysdate() + 30;

 

In time expression, a numeric quantity may be added to a time value to form a new time value. The numeric value is treated as a number of minutes.

next_hour = systime() + 60;

subtraction (-)

In numeric expressions, the result is the difference of the two values.

total = price – discount;

 

In date expressions, a numeric quantity may be subtracted from a date value to form a new date value. The numeric value is treated as a number of days.;

yesterday = sysdate() – 1;

 

Two date values can be subtracted to find the difference between them in days.

days_to_pay = due_date – sysdate();

 

In time expressions, a numeric quantity may be subtracted from a time value. The numeric value is treated as a number of minutes.

start_time = systime() – 30;

 

Two time values can be subtracted to find the difference between them in minutes.

elapsed_time = start_time – end_time;

multiplication (*)

The multiplication operator (*) is used in numeric expressions. The result is the product of the two numbers.

total = number_of_periods * contribution;

division (/)

The division operator (/) is used in numeric expressions. The result is the quotient of the two numbers.

check_total = salary / number_of_pay_periods;

modulus (%)

The modulus operator (%) is used in numeric expressions. The result is the remainder of the division of the first number by the second number (for example, 71 % 10 = 1).

single_items = items_ordered % items_per_box;

power (^)

The power operator is used in numeric expressions. The result is the first operand raised to the power of the second operand. Only powers of 10 may be calculated.

number = 10 ^ 5;

<< or shiftl

The shift left operator is used with numeric expressions. The result is the supplied integral value with its bits shifted to the left a specified number of positions. Zeros are shifted into the value.

result = 16 << 2;

result = 8 shiftl 3;

>> or shiftr

The shift right operator is used with numeric expressions. The result is the supplied integral value with its bits shifted to the right a specified number of positions. Zeros are shifted into the value.

result = 16 >> 2;

result = 256 shiftr 3;

equality (=)

The equality operator is supported in numeric, boolean, string, date and time expressions. In all expressions the result is true if the two operands are equal, and false if they are not equal.

if total = 100 then
result = true;

end if;

inequality (<>)

The inequality operator is supported in numeric, boolean, string, date and time expressions. In all expressions the result is false if the two operands are equal, and true if they are not equal.

if password <> “access” then
abort script;

end if;

less than (<)

The less than operator is supported in numeric, string, date and time expressions. In all expressions the result is true if the first operand is less than the second operand, and false if it is not.

if total < 100 then
warning “Total is not 100%”;

end if;

greater than (>)

The greater than operator is supported in numeric, string, date and time expressions. In all expressions the result is true if the first operand is greater than the second operand, and false if it is not.

if current_date > sysdate() then
warning “Date is not valid.”;

end if;

less than or equal to (<=)

The less than or equal to operator is supported in numeric, string, date and time expressions. In all expressions the result is true if the first operand is less than or equal to the second operand, and false if it is not.

if systime() <= posting_time then
warning “Posting can’t begin.”;

end if;

greater than or equal to (>=)

The greater than or equal operator is supported in numeric, string, date and time expressions. In all expressions the result is true if the first operand is greater than or equal to the second operand, and false if it is not.

if total >= 100 then
discount = 10;

else
discount = 0;

end if;

and

In boolean expressions, the result is true if both of the operands are true, and false if either of the operands is false.

if (count > 100) and (total > 0) then
set discount to 15;

end if;

 

In numeric expressions, the and operator performs a logical and operation of the corresponding bits of two integral values and returns the result.

result = status and 16;

or

In boolean expressions, the result is true if either of the operands is true, and false if both of the operands are false.

if (count > 100) or (total > 100) then
discount = 20;

end if;

 

In numeric expressions, the or operator performs a logical or operation of the corresponding bits of two integral values and returns the result.

result = status or 255;

xor

In boolean expressions, the result is true if either of the operands is true, and false if both of the operands are true or both operands are false.

if printer xor screen then
run report ‘Customer List’;

end if;

 

In numeric expressions, the xor operator performs an exclusive or operation of the corresponding bits of two integral values and returns the result.

result = status xor 255;

not

In boolean expressions the not operator is used to complement (reverse) the value of a boolean expression.

if not enabled, then
warning “Printing not enabled.”;

end if;

 

In numeric expressions, it performs a logical not operation on each bit of an integral value and returns the result.

result = not status;

implication or conditional (imp)

In boolean expressions, the implication operator examines the first operand. If it is true, the value of the second operand is returned; otherwise, the value true is returned.

result = a imp b;

Operator

Description

Example

unary minus (-)

In numeric expressions, the unary minus operator (-) indicates a negative value.

neg_val = –10;

addition (+)

In numeric expressions, the result is the sum of the two values.

total = subtotal + 5;

 

In string expressions, the result is the concatenation of the first and second strings.

name = “Steve ” + “Jones”;

 

In date expressions, a numeric quantity may be added to a date to form a new date. The numeric value is treated as a number of days.

due_date = sysdate() + 30;

If then…end if

The if then…end if statement is one of the structures you can use to make decisions. The if then…end if statement evaluates boolean expressions and, based on the results, executes a set of sanScript statements.

The following script uses an if then…end if statement to execute a set of statements based upon the value of the Purchase Amount field.

if 'Purchase Amount' > 'Credit Limit' then
    error "Credit limit exceeded. Can't process the transaction";
    'Transaction Complete' = false;
else
    'Transaction Complete' = true;
end if;
 

If the purchase amount is greater than the credit limit, an error message is displayed and the Transaction Complete field is set to false. Otherwise, the Transaction Complete field is set to true.

Case…end case

The other decision structure you can use in scripts is the case…end case statement. Like the if then…end if statement, this statement allows a series of statements to run on a conditional basis.

The following script uses the case…end case statement to o set the rebate amount to be paid to customers based upon their total purchases for the fiscal year.

case 'FY Total Purchases'
    in [-99999 to 999] 
    'Rebate Award Amount' = 0;
    in [1000 to 2999] 
    'Rebate Award Amount' = 15;
    in [3000 to 4999] 
    'Rebate Award Amount' = 25;
else
    'Rebate Award Amount' = 50;
end case;
 

The case…end case statement makes it easy to run sanScript statements based on ranges of values

Loop structures

In cases where you want a set of sanScript statements to be executed repeatedly, you will use a loop structure. Several loop structures are available in sanScript.

For loop

The for loop iterates a variable through a specified range of variables. They are useful when you need to use the value of the variable being iterated, such as for an array index.

The following script uses a for do…end for statement to set the fields of the Monthly Total array to 0.

local integer i;
 
for i = 1 to 12 do
    'Monthly Total'[i] = 0;
end for;
 

Repeat loop

The repeat loop runs a set of sanScript statements, then tests a boolean condition to determine whether the loop should be repeated. Using a repeat…untilstatement ensures that the statements within the loop will be run at least once.

The following script uses a repeat loop to read through all of the records in a temporary table.

get first table Temptable;
repeat
    get next table Temptable;
until err() = EOF;
 

While loop

The while loop tests a boolean expression. If the expression is true, the set of sanScript statements in the loop is run. Using a while do…end while statement ensures that the condition of the loop is tested before any of the statements within the loop are ever executed.

The following example uses a while loop to read through all of the records in a table.

get first table Customer_Master;
while err() = OKAY do 
    {Not at the end of the table, so read the next item.}
   get next table Customer_Master; end while;

Microsoft Dynamics GP Purchase Order Processing and Payables

16 May

Full Purchase Order Cycle

1)      Create a Purchase Order

2)      Print the Purchase Order

3)      Receive the shipped item for the purchase order

4)      Select the received item on the receiving entry screen

5)      Post the receiving receipt

6)      Enter/Match Invoice

7)      Select the Purchase Order to be invoiced

8)      Post the invoicing receipt

9)      Generate a payment against the Invoice for the received Purchase order

10)   Print Check

11)   Post Check

Example

Using the below mentioned details we will be generating a purchase order and will complete the full cycle till payment using the same trail.

Item:                                                                     ABC

Vendor:                                                                001

Ordered Quantity:                                               100

Current Standard Cost:                                                 0

Ordering Cost for per unit of Item:           10

Taxable Item:                                                    Yes

Current on Hand:                                             0

 Image

PO Number: PO2078      PO Status: New                                Revision: 0

Step 2: Print the Purchase Order

Image

After printing the document

PO Status: Released       Revision: 0

If you make changes to the PO after printing, the revision number will get changed.

Image

PO Status: Change Order              Revision: 1

Note: Until and unless you don’t print the document again, any changes made on PO will not change the revision number. If you print the document again and then make changes the revision number will get changed to 2.

Step 3: Receive the PO.

Link: Purchasing->Transactions->Receiving Transaction Entry

Image

You can directly come on to this screen with the same PO from the purchase order entry screen using the ‘Receive PO’ option under actions drill down on PO entry screen.

The other way

1)      Open Receiving Transaction Entry

2)      Enter Vendor Doc No and Select Vendor

3)      Click on Auto Receive button from the above bar and a Select Purchase Order Items window will POP UP.

Image

4)      Select PO that you want to receive.

5)      You can either assign the receiving receipt to a batch for later posting or you can directly post it from the receiving screen itself.

Important Points

1)      Once you do the receiving posting

  1. The PO gets removed from the PO entry screen.
  2. The On Hand Quantity for the Item gets increased.
  3. The receiving GL’s are been created which can be seen on General Transaction Entry screen in Financial Module.

Journal Entries after Receiving Posting

Image

As you can see there is Purchase Price Variance and that is because the item is a standard cost and since the items standard cost was zero but we purchased it in 10 per unit so therefore a variance.

Now if we Roll Up the cost for the item and then again create a PO for the same item and with same specifications the GL in this case will be:

Account                               Debit                     Credit

Inventory                            1000                       0

Accrued Purchase            0                              1000

Step 4: Create an Invoice for Purchasing

Link: Purchasing->Transactions->Enter/Match Invoice

Image

On Purchasing Invoice Entry Screen

1)      Enter Vendor Doc No and Select Vendor

2)      Click on Auto Invoice button from the above bar and a Select Purchase Order Items window will POP UP.

Image

3)      Select the PO you want to invoice.

4)      You can either assign the invoicing receipt to a batch for later posting or you can directly post it from the invoicing screen itself.

5)      The Invoicing GL’s are been created which can be seen on General Transaction Entry screen in Financial Module.

Journal Entries after Invoicing PO

Image

Note: You won’t be able to see the GL’s on General Entry screen in Financial Module until and unless you don’t close the last Transaction Screen. In this case if I don’t close my last transaction screen i.e. Purchasing Invoice Entry Screen after posting I won’t be able to see the Invoicing general entries. The conclusion is GP updates the last GL’s entries after the last transaction window corresponding to those GL’s is closed i.e. the trigger point for updating the window is closing of window.

Payables Management

Step 1: Creating a payments document against the PO Invoice.

There are two ways of going in this case either with Edit Check or Edit Check Batch.

We will be going with the Edit Check Batch Option firstly. The advantage of using this functionality is we can enter multiple vendors’ payments in to a batch in a single go.

Link: Purchasing->Transactions->Edit Check Batch

Image

On Edit Payables Check Batch Screen

1)      Enter the Batch ID in which you want to add the payments.

2)      Check the vendors and the corresponding document for which you are going to make the payments.

3)      Press Okay

Now we will do the same process using the Edit Check screen. On this screen you also have an option of seeing the distributions.

Link: Purchasing->Transactions->Edit Check

On Edit Check Screen

1)      Enter the Batch ID in which you want to add the payments.

2)      Type in or Select the vendor using the lookup functionality.

Image

3)      Now click on the apply button to select the documents for which you want to make the payments.

Image

4)      Select the documents against which you are going to make the payments and press okay.

5)      Once the documents are been select now save the Batch.

Step 2: Print Checks against the applied payables document

 Link: Purchasing->Transactions->Print Check

Image

On Print Payables Checks

1)      Select the batch in which you added your payments.

2)      Print

Note: As you are going to print the check system will automatically open the Post Payables Check screen.

Now to update the bank reconciliation module with the check information we have to post the check using Post Payables Check screen.

Link: Purchasing->Transactions->Post Check

On Post Payables check screen

Image

1)      Select the Batch

2)      Process ( this will post the check information in bank reconciliation and will generate the distribution GL’s)

Journal Entries after making the Payments

Image

Overall GL Distribution for the complete cycle

ACCOUNT Debit Credit

Receiving

Inventory

$1,000.00

$0.00

Accrued Purchase

$0.00

$1,000.00

Invoicing

Tax

$70.00

$0.00

Accounts Payable

$0.00

$1,070.00

Accrued Purchase

$1,000.00

$0.00

Payment/Payables

Cash

$0.00

$1,070.00

Accounts Payable

$1,070.00

$0.00

How to Create an XML file from Microsoft Excel

3 Feb

This Post is more useful to all, This application  reads the transaction from excel file and create XML, before we are going to generate an XML file you should set the Destination Folder path.

add the below namespace before your going to start.

using System.Data.SqlClient;
using System.Data.OleDb;
using System.Xml;
using System.IO;

2013-02-03_141105

write the below code under the Import from Excel button_Click event

private void button1_Click(object sender, EventArgs e)
{
string connectionString = String.Format(@”Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=””Excel 8.0;HDR=YES;IMEX=1;”””, “d:\\TestNew.xls”);
string query = String.Format(“select * from [{0}$]”, “Sheet1”);
OleDbDataAdapter VendorRecdataAdapter = new OleDbDataAdapter(query, connectionString);
VendorRecdataAdapter.Fill(dataSet, “VendorMaster”);
int DataSetRowCount = dataSet.Tables[0].Rows.Count;
dataGridView1.DataSource = dataSet.Tables[0];
}

 

write the below code under Browse button_Click event

private void button3_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
textBox1.Text = dialog.SelectedPath;

}

Write the blow code under the Generate XML File button Click Event

private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text != “”)
{

DataTable dt = new DataTable();
dt = dataSet.Tables[0];
int rows = dt.Rows.Count;
string First = string.Empty;
string second = string.Empty;
string fileName = string.Empty;
int k = 0;
for (int i = 0; i < rows;)
{
XmlDocument XDoc = new XmlDocument();
XmlElement XElemRoot = XDoc.CreateElement(“PayableInvoice”);
int j = 0;
//int i = 0;
// Create root node.
XElemRoot.SetAttribute(“BatchID”, dt.Rows[i][0].ToString());
//Add the node to the document.
XDoc.AppendChild(XElemRoot);
XmlElement Xsource = XDoc.CreateElement(“Invoice”);
Xsource.SetAttribute(“DocumentType”, dt.Rows[i][1].ToString());
Xsource.SetAttribute(“DocumentNumber”, dt.Rows[i][2].ToString());
fileName = dt.Rows[i][2].ToString();
Xsource.SetAttribute(“Description”, dt.Rows[i][3].ToString());
Xsource.SetAttribute(“DocumentDate”, dt.Rows[i][4].ToString());
Xsource.SetAttribute(“VendorID”, dt.Rows[i][5].ToString());
Xsource.SetAttribute(“PaymentTerm”, dt.Rows[i][6].ToString());
Xsource.SetAttribute(“DocumentAmount”, dt.Rows[i][7].ToString());
do
{
First = dt.Rows[i][2].ToString();
k = i + 1;
if (k < rows)
{
second = dt.Rows[k][2].ToString();

}
j = i;
XmlElement XTemp = XDoc.CreateElement(“DistributionType”);
XTemp.SetAttribute(“DistributionType”, dt.Rows[j][8].ToString());
XTemp.SetAttribute(“DistributionReference”, dt.Rows[j][9].ToString());
XTemp.SetAttribute(“AccountNumber”, dt.Rows[j][10].ToString());
XTemp.SetAttribute(“DebitAmount”, dt.Rows[j][11].ToString());
XTemp.SetAttribute(“CreditAmount”, dt.Rows[j][12].ToString());
Xsource.AppendChild(XTemp);
j = i + 1;
i++;
if (j == rows)
second = “End”;
} while (First == second);
XElemRoot.AppendChild(Xsource);

//i++;
XDoc.Save(textBox1.Text + “\\” + fileName + “.xml”);
}
}
else
{
MessageBox.Show(“Please Select Folder to generate the files….”);
}

foreach (string file in Directory.EnumerateFiles(textBox1.Text, “*.xml”))
{
treeView1.Nodes.Add(Path.GetFileName(file));
}
}

I hope you understand the above post, if you have any clarification please revert back.