Habilitar búsqueda por descripción Articulo Dynamics GP
La posibilidad hacer una búsqueda por descripción es una opción que me pedían algunos clientes en Microsoft Dynamics GP debido al hecho de si querían buscar por descripción de articulo tenían que agregar la columna para luego consultar. la idea era dejarle esta opción por defecto.
Inicialmente Cree un archivo con extension *.MAC en la carpeta donde esta instalado Microsoft Dynamics GP
Dentro del archivo copie y pegue el siguiente codigo:
# DEXVERSION=10.0.193.0 2 2
CheckActiveWin dictionary ‘SmartList’ form ‘IV_Item_Number_Lookup’ window ‘IV_Item_Number_Lookup’
MoveTo field ‘ASI_LU_Column_Button_Drop_List’ item 0
ClickHit field ‘ASI_LU_Column_Button_Drop_List’ item 1 # ‘por descripción’
Luego agregue a la ventana de busqueda de articulos el siguiente codigo VBA
Private Sub Window_BeforeOpen(OpenVisible As Boolean)
Dim CompilerApp As Object
Dim CompilerMessage As String
Dim CompilerError As Integer
Dim Commands As String
‘ Create link without having reference marked
Set CompilerApp = CreateObject(«Dynamics.Application»)
Commands = «»
Commands = Commands & «local integer l_file_id; » & vbCrLf
Commands = Commands & «local string pathname; » & vbCrLf
Commands = Commands & «pathname = Path_GetForApp(1) + «»\Mac\articulo.MAC»»; » & vbCrLf
Commands = Commands & «if File_Probe(pathname) then » & vbCrLf
Commands = Commands & » run macro pathname; » & vbCrLf
Commands = Commands & «end if; » & vbCrLf
‘ Execute SanScript
CompilerError = CompilerApp.ExecuteSanScript(Commands, CompilerMessage)
If CompilerError <> 0 Then
MsgBox CompilerMessage
End If
End Sub
Esto lo que hace es buscar el macro que esta en guardado en la carpeta Mac y ejecutarlo cada vez que se habré la ventana