Adding columns to the detail grid of Transaction Screens in Sage 300

By | June 6, 2011

You must be wondering why one has to write a blog on this topic specifically when Sage has a powerful and easy to use Optional field’s module which not only captures custom information on Maintenance and Transaction Screen but also Tracks the information from Originating document through GL and not to forget the capability of reporting based on Optional fields.

Well though Optional field Module completely eliminates the need for customization to capture additional/custom information, there are still few screens where we don’t have the advantage of using optional fields and if a need arises to capture additional/custom information on this screens one has no other option than customization and hence we thought to put it down in a blog

Recently we did a customization where we had to add three columns to the IC Kitting Items screen (i.e. ‘Category’, ‘Type’ and ‘Unit Price’). Taking this as an example let us see how to add custom or user-defined columns to a Grid on UI of Sage Accpac ERP.
Below is the original screen of the Accpac I/C Kitting Items screen.
To add three new fields to the detail grid of the I/C Kitting Items we have to first create a Override subclass view for the detail view (i.e. ICKITD) and need to added three new columns to the view (it is assumed that you are aware of how to deal with Views in Accpac if not then you must refer to Sage Accpac SDK)

With above Sub-Classing these fields get created into Database and are also a part of business logic…

Now to add three new columns to I/C Kitting Items screen; we will have to customize the screen and have to add following code to the UI Opened.

Private Sub ACCPACIC1550UICtrl1_OnUIAppOpened()
On Error GoTo ErorHandler
Dim lintcolumnCount As Integer
‘set the number of column present in the viewlist
lintcolumnCount = vwkTDtlList.ColumnCount
‘Add the category column
vwkTDtlList.AddColumn lintcolumnCount, “CATEGORY”, 0, “Category”, ALIGMENT_LEFT, 100, True, True, False
‘The below code is used to populate the finder against the category column. The standard
‘category finder will get populated against the column as the view ID of the category is
‘IC0120.
vwkTDtlList.SetFinderInfo lintcolumnCount, “IC0210”, 1
lintcolumnCount = vwkTDtlList.ColumnCount
‘Add the add unit price column
vwkTDtlList.AddColumn lintcolumnCount, “TYPE”, 0, “Price Type”, ALIGMENT_RIGHT, 100, True, False, False
vwkTDtlList.Refresh
lintcolumnCount = vwkTDtlList.ColumnCount
‘Add the add unit price coloumn
vwkTDtlList.AddColumn lintcolumnCount, “UNITPRICE”, 0, “Unit PricePercentage”, ALIGMENT_RIGHT, 150, True, False, False
vwkTDtlList.Refresh
Exit Sub
ErorHandler:
ErrorHandler (“ACCPACIC1550UICtrl1_OnUIAppOpened”)
End Sub
<Snippet>

That’s it, rest all is taken care by View…
Below is the screen shot of the newly added columns to I/C Kitting Items screen.
For any queries or more information, please drop us an email at sage@greytrix.com.

About Us
Greytrix is a one-stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation expertise.
Greytrix has some unique solutions of Sage 300 integration with Sage CRM, Salesforce.com and Magento eCommerce along with Sage 300 Migration from Sage 50 US, Sage 50 CA, Sage PRO, QuickBooks, Sage Business Vision and Sage Business Works. We also offer best-in-class Sage 300 customization and development services to Sage business partners, end users, and Sage PSG worldwide.
For more details on Sage 300 Services, please contact us at accpac@greytrix.com. We will be glad to assist you.