Yes, it can be done. I did a similar modification to redirect users to open the Item Inquiry card instead of the Item Maintenance card from the Sales Transaction Entry window. It does require Modifier and VBA. If you're moving to Web Client you'll need to come up with a workaround since vba isn't supported.
I documented how I did it. This might give you an idea what it would take to do your mod.
Steps:
- Add Item Inquiry to Modifier.
- Add Text field "Item Class".
- Create String Field from ToolBox and name it (L)Item Class
- Add Text field "Category".
- Create String Field from ToolBox and name it (L)Category
- Set Object Properties to same as other fields.
- Link Prompt to text field.
- Assign security to modified form.
- Open Item Inquiry in GP.
- Add Item Inquiry form to VBA.
- Add fields Item Number, ItemClass, GoTo, Category.
- Open Item Maintenance card.
- Add Item Maintenance form to VBA
- Add fields ItemNumber and ClassID.
- Open Item Maintenance Options.
- Add Item Maintenance Options form to VBA
- Add User Defined Category 5 ( Category ) field.
- Open Sales Transaction Entry form.
- Add the Item Number zoom button ( not the lookup button ) and the Item Number field.
- Open VBA and enter the following scripts in the appropriate objects.
- Microsoft_Dynamics_GP-ItemMaintenance(Code)
' Script to hide the item maintenance window when opened from iteminquiry script
Option Explicit
Public OpenHidden As Boolean
Private Sub Window_BeforeOpen(OpenVisible As Boolean)
If OpenHidden Then
' Hide window on open
OpenVisible = False
' Open visible next time
OpenHidden = False
End If
End Sub
- Microsoft_Dynamics_GP-ItemMaintenanceOptions(Code)
' Script to hide the item maintenance window when opened from iteminquiry script
Option Explicit
Public OpenHidden As Boolean
Private Sub Window_BeforeOpen(OpenVisible As Boolean)
If OpenHidden Then
' Hide window on open
OpenVisible = False
' Open visible next time
OpenHidden = False
End If
End Sub
- Microsoft_Dynamics_GP-ItemInquiry(Code)
' Script to set environment to hide item-maint and item-maint-options
Option Explicit
Public OpenHidden As Boolean
Private Sub Window_BeforeOpen(OpenVisible As Boolean)
If OpenHidden Then
' Hide window on open
OpenVisible = False
' Open visible next time
OpenHidden = False
End If
End Sub
' Script to open PriceList Inquiry instead of PriceList Maintenance card -
Private Sub GoTo_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)
If ([GoTo].Value = 3) Then
With ItemPriceListInquiry
If (.IsLoaded = False) Then
.Open
End If
.Activate
.ItemNumber = ItemNumber
End With
CancelLogic = True
End If
End Sub
' Script to show ItemMaintenance.ClassID on ItemInquiry form
Private Sub ItemNumber_Changed()
ItemMaintenance.OpenHidden = True
ItemMaintenanceOptions.OpenHidden = True
ItemMaintenance.Open
ItemMaintenanceOptions.Open
ItemMaintenance.ItemNumber = ItemInquiry.ItemNumber
ItemInquiry.ItemClass = ItemMaintenance.ClassID
ItemInquiry.Category = ItemMaintenanceOptions.Category
ItemMaintenanceOptions.Close
ItemMaintenance.Close
End Sub
- Microsoft _Dynamics-SalesTransactionEntry(Code)
' Script to open Item Inquiry from Sales Trx Entry
Private Sub CustomLinksZoomButton_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)
If ([CustomLinksZoomButton].Value = 1) Then
With ItemInquiry
If (.IsLoaded = False) Then
.Open
End If
.Activate
ItemInquiry.ItemNumber = SalesTransactionEntryDetail.ItemNumber
End With
CancelLogic = True
End If
End Sub