Add Column to Part Transaction History Tracker - V8.03

Thank Jose.  I'm really appreciate your advice and am fine with the BAQ (apart from I can't put the running total in there that's shown on the tracker?) but it's the customization \ coding I'm struggling with. 


I'm not totally sure where to put your code - if it incorporates into what I had or is on a new customisation?  Or whether it will just add the columns in that I need or replace the current grid?  DO I use code in addition to what you have given me to replace 'MYPART' with the part number?  I have tried adding your code to 'EpiViewNotification', and added the relevant Custom Assemblies, however I get a compiling error:

 Error: BC30451 - line 71 (115) - Name '_session' is not declare


I'm also unsure how to get 'Myval'?  Sorry for all the questions :/

Hi.  I want to add a couple of columns to the Part Transaction History Tracker - one is the Employee ID, which in theory should be available but Vantage doesn't seem to populate it!  However, I have the data I require in the JobHead table along with the Employee Name :)


I have used information from this group before to perform a similar update on the TimePhas Form but although I've tried using the same code it's not working (see my adapted code below) - AddEmployeeID() doesn't seem to be firing but I am unsure where else to place it?  I have tried moving it to before the If (args.NotifyType) line but then I just get an exception error saying Invalid Query?


I can add the JobHead table through FKV but am unsure then if I can use that as an alternative to add the data to the column in the grid?


Thank you!



'//**************************************************
'// Custom VB.NET code for PartTranHistForm
'// Created: 08/06/2016 13:32:32
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO


Module Script



    '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
    '// Begin Wizard Added Module Level Variables **

    Private WithEvents edvPartTranHist As EpiDataView
    Private WithEvents edvFilter As EpiDataView

    '// End Wizard Added Module Level Variables **


    '// Add Custom Module Level Variables Here **


    Sub InitializeCustomCode()


        '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
        '// Begin Wizard Added Variable Intialization
       
        edvPartTranHist = cType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)
        edvFilter = cType(oTrans.EpiDataViews("Filter"), EpiDataView)
       
        '// End Wizard Added Variable Intialization
        '// Begin Custom Method Calls

        If Not (edvPartTranHist.dataView.Table.Columns.Contains("EmployeeID")) Then
            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("EmployeeID"))
        End If
       
        If Not (edvPartTranHist.dataView.Table.Columns.Contains("EmployeeName")) Then
            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("EmployeeName"))
        End If
       
        '// End Custom Method Calls
    End Sub


    Sub DestroyCustomCode()


        '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
        '// Begin Wizard Added Object Disposal

        edvPartTranHist = Nothing
        edvFilter = Nothing
       
        '// End Wizard Added Object Disposal
        '// Begin Custom Code Disposal

        '// End Custom Code Disposal
    End Sub

   
    Private Sub edvPartTranHist_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvFilter.EpiViewNotification
        '// ** Argument Properties and Uses **
        '// view.dataView(args.Row)("[FieldName]")
        '// args.Row, args.Column, args.Sender, args.NotifyType
        '// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
        MsgBox("edvPartTranHist_EpiViewNotification-1 Fired")
        AddEmployeeID()                                         
        If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
            If (args.Row > -1) Then
                MsgBox("edvPartTranHist_EpiViewNotification-2 Fired")
               
'                AddEmployeeName()
            End If
        End If
    End Sub


    Private Sub AddEmployeeID()
            edvPartTranHist = cType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)

        MsgBox("AddEmployeeID Fired")       
        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows
            If Not IsDBNull(dr("JobNum")) Then
                dr("EmployeeID") = "DATA"
                'edvPartTranHist.DataView(edvPartTranHist.Row)("EmpID")
            End If
        Next
    End Sub
   
   
'    Private Sub AddEmployeeName()
'           
'        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows
'            If Not IsDBNull(dr("JobNum")) Then
'                dr("EmployeeName") = getEmployeeName(dr("JobNum"))
'            End If
'        Next
'    End Sub   




End Module

I have tried this multiple ways and if I can't add these columns then I am probably going to have to make all the Employees have separate Windows and Vantage logons to allow me to use the Entry person that already exists on the grid - the only problem is it still doesn't show the User ID correctly on Backflush records.  I'm sure I am pretty close the resolution but just can't see what I'm missing on here.  Thanks in advance.


I have tried using a BPM to update the EmpID field that already exists in the PartTran table.  Even though it exists on the table, it doesn't exist on the grid and I am getting this error:

System.ArgumentException: EmpID is neither a DataColumn nor a DataRelation for table PartTranHist.



I have also tried using an adapter to link to JobHead I have the following problem:

************** Exception Text **************
Epicor.Mfg.Common.BusinessObjectException: Record not found.
   at Epicor.Mfg.Proxy.JobEntryImpl.GetByID(String jobNum)
   at Epicor.Mfg.UI.Adapters.JobEntryAdapter.GetByID(String jobNum)
   at Script.getEmployeeID(String job)
   at Script.AddEmployeeInfo()
   at Script.edvPartTranHist_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
   at Epicor.Mfg.UI.FrameWork.EpiViewNotification.Invoke(EpiDataView view, EpiNotifyArgs args)
   at Epicor.Mfg.UI.FrameWork.EpiDataView.Notify(EpiNotifyArgs args)
   at Epicor.Mfg.UI.App.PartTranHistTracker.Transaction.GetPartTranHistRows()


'//**************************************************
'// Custom VB.NET code for PartTranHistForm
'// Created: 08/06/2016 13:32:32
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO


Module Script


    '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
    '// Begin Wizard Added Module Level Variables **

    Private WithEvents edvPartTranHist As EpiDataView

    '// End Wizard Added Module Level Variables **


    '// Add Custom Module Level Variables Here **


    Sub InitializeCustomCode()


        '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
        '// Begin Wizard Added Variable Intialization
       
        edvPartTranHist = cType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)
       
        '// End Wizard Added Variable Intialization
        '// Begin Custom Method Calls

        If Not (edvPartTranHist.dataView.Table.Columns.Contains("EmployeeID")) Then
            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("EmployeeID"))
        End If
       
        If Not (edvPartTranHist.dataView.Table.Columns.Contains("EmployeeName")) Then
            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("EmployeeName"))
        End If
       
        '// End Custom Method Calls
    End Sub


    Sub DestroyCustomCode()


        '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
        '// Begin Wizard Added Object Disposal

        edvPartTranHist = Nothing
       
        '// End Wizard Added Object Disposal
        '// Begin Custom Code Disposal

        '// End Custom Code Disposal
    End Sub

   
    Private Sub edvPartTranHist_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvPartTranHist.EpiViewNotification
        '// ** Argument Properties and Uses **
        '// view.dataView(args.Row)("[FieldName]")
        '// args.Row, args.Column, args.Sender, args.NotifyType
        '// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
        'MsgBox("edvPartTranHist_EpiViewNotification-1 Fired")
            
                AddEmployeeInfo()      
        If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
            If (args.Row > -1) Then
                                         
            End If
        End If
    End Sub


    Private Sub AddEmployeeInfo()
        'MsgBox("AddEmployeeInfo Fired")       
        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows
            If Not IsDBNull(dr("JobNum")) Then
                dr("EmployeeID") = getEmployeeID(dr("JobNum"))
            End If
        Next
    End Sub
   

    Private Function getEmployeeID(ByVal job As String) As String
        Dim EmployeeID As String
        Dim myGrid As EpiUltraGrid = cType(csm.GetNativeControlReference("f83d6262-a7d9-4fb5-a7d0-54644a9bb66b"), EpiUltraGrid)
        Dim adpJobEntry As JobEntryAdapter = New JobEntryAdapter(PartTranHistForm)
        adpJobEntry.BOConnect()
       
        Dim edvPartTranHist As EpiDataView = CType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)
        Dim result As Boolean = adpJobEntry.GetByID(job)
       
        Dim dsJobInfo As DataSet = adpJobEntry.JobEntryData
        MsgBox("getEmployeeID Fired")
        Dim recordSelected As Boolean
        Dim showSearch As Boolean = False
        Dim whereClause As String = "'JobNum = '" + job + "'"
            If recordSelected = True And adpJobEntry.JobEntryData.JobHead(0)("JobNum") <> "" Then
                EmployeeID = adpJobEntry.JobEntryData.JobHead(0)("ShortChar04")
            Else
                EmployeeID = ""
            End If
       
        Return EmployeeID
       
    End Function


End Module




I have this working :)  But it is very slow :(  Any pointers on improving my code?


Would it work faster using FKV?  If so, how do I reference an FKV to add it to the column created? 



'//**************************************************
'// Custom VB.NET code for PartTranHistForm
'// Created: 08/06/2016 13:32:32
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO


Module Script


    '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
    '// Begin Wizard Added Module Level Variables **

    Private WithEvents edvPartTranHist As EpiDataView

    '// End Wizard Added Module Level Variables **


    '// Add Custom Module Level Variables Here **


    Sub InitializeCustomCode()


        '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
        '// Begin Wizard Added Variable Intialization
       
        edvPartTranHist = cType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)
       
        '// End Wizard Added Variable Intialization
        '// Begin Custom Method Calls

        If Not (edvPartTranHist.dataView.Table.Columns.Contains("EmployeeID")) Then
            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("EmployeeID"))
        End If
       
        If Not (edvPartTranHist.dataView.Table.Columns.Contains("EmployeeName")) Then
            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("EmployeeName"))
        End If
       
        '// End Custom Method Calls
    End Sub


    Sub DestroyCustomCode()


        '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
        '// Begin Wizard Added Object Disposal

        edvPartTranHist = Nothing
       
        '// End Wizard Added Object Disposal
        '// Begin Custom Code Disposal

        '// End Custom Code Disposal
    End Sub

   
    Private Sub edvPartTranHist_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvPartTranHist.EpiViewNotification
        '// ** Argument Properties and Uses **
        '// view.dataView(args.Row)("[FieldName]")
        '// args.Row, args.Column, args.Sender, args.NotifyType
        '// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
                AddEmployeeID()             
                AddEmployeeName()      
        If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
            If (args.Row > -1) Then
                                         
            End If
        End If
    End Sub


    Private Sub AddEmployeeID()
        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows
            If (dr("JobNum")) > "A" Then
                dr("EmployeeID") = getEmployeeID(dr("JobNum"))
            End If
        Next
    End Sub
    
    
    Private Sub AddEmployeeName()
        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows
            If (dr("JobNum")) > "A" Then
                dr("EmployeeName") = getEmployeeName(dr("JobNum"))
            End If
        Next
    End Sub
   

    Private Function getEmployeeID(ByVal job As String) As String
        Dim EmployeeID As String
        Dim myGrid As EpiUltraGrid = cType(csm.GetNativeControlReference("f83d6262-a7d9-4fb5-a7d0-54644a9bb66b"), EpiUltraGrid)
        Dim adpJobEntry As JobEntryAdapter = New JobEntryAdapter(PartTranHistForm)
        adpJobEntry.BOConnect()
       
        Dim edvPartTranHist As EpiDataView = CType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)
        Dim result As Boolean = adpJobEntry.GetByID(job)
       
        Dim dsJobInfo As DataSet = adpJobEntry.JobEntryData
        Dim recordSelected As Boolean
        Dim showSearch As Boolean = False
        Dim whereClause As String = "'JobNum = '" + job + "'"
'            If recordSelected = True Then
'            MsgBox("getEmployeeID recordSelected " & adpJobEntry.JobEntryData.JobHead(0)("JobNum"))
                EmployeeID = adpJobEntry.JobEntryData.JobHead(0)("ShortChar04")
'            Else
'                EmployeeID = ""
'            End If
       
        Return EmployeeID     
       
    End Function


    Private Function getEmployeeName(ByVal job As String) As String
        Dim EmployeeName As String
        Dim myGrid As EpiUltraGrid = cType(csm.GetNativeControlReference("f83d6262-a7d9-4fb5-a7d0-54644a9bb66b"), EpiUltraGrid)
        Dim adpJobEntry As JobEntryAdapter = New JobEntryAdapter(PartTranHistForm)
        adpJobEntry.BOConnect()
       
        Dim edvPartTranHist As EpiDataView = CType(oTrans.EpiDataViews("PartTranHist"), EpiDataView)
        Dim result As Boolean = adpJobEntry.GetByID(job)
       
        Dim dsJobInfo As DataSet = adpJobEntry.JobEntryData
        Dim recordSelected As Boolean
        Dim showSearch As Boolean = False
        Dim whereClause As String = "'JobNum = '" + job + "'"
                EmployeeName = adpJobEntry.JobEntryData.JobHead(0)("ShortChar05")
       
        Return EmployeeName     
       
    End Function

End Module

You might be better off replacing the grid with a baq

On Thursday, June 16, 2016, tracy.smith@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p>I have this working :)  But it is very slow :(  Any pointers on improving my code?</p><p><br></p><p>Would it work faster using FKV?  If so, how do I reference an FKV to add it to the column created?  </p><p><br></p><p><br></p><p>&#39;//**************************************************<br>&#39;// Custom <a rel="nofollow" target="_blank" href="http://VB.NET">VB.NET</a> code for PartTranHistForm<br>&#39;// Created: 08/06/2016 13:32:32<br>&#39;//**************************************************<br>Imports System<br>Imports System.Data<br>Imports System.Diagnostics<br>Imports System.Windows.Forms<br>Imports System.ComponentModel<br>Imports Microsoft.VisualBasic<br>Imports Epicor.Mfg.UI<br>Imports Epicor.Mfg.UI.FrameWork<br>Imports Epicor.Mfg.UI.ExtendedProps<br>Imports Epicor.Mfg.UI.FormFunctions<br>Imports Epicor.Mfg.UI.Customization<br>Imports Epicor.Mfg.UI.Adapters<br>Imports Epicor.Mfg.UI.Searches<br>Imports <a rel="nofollow" target="_blank" href="http://Epicor.Mfg.BO">Epicor.Mfg.BO</a></p><p><br>Module Script </p><p><br>    &#39;// ** Wizard Insert Location - Do Not Remove &#39;Begin/End Wizard Added Module Level Variables&#39; Comments! ** <br>    &#39;// Begin Wizard Added Module Level Variables ** </p><p>    Private WithEvents edvPartTranHist As EpiDataView</p><p>    &#39;// End Wizard Added Module Level Variables ** </p><p><br>    &#39;// Add Custom Module Level Variables Here ** </p><p><br></p><p>    Sub InitializeCustomCode() </p><p><br>        &#39;// ** Wizard Insert Location - Do not delete &#39;Begin/End Wizard Added Variable Intialization&#39; lines ** <br>        &#39;// Begin Wizard Added Variable Intialization <br>        <br>        edvPartTranHist = cType(oTrans.EpiDataViews(&quot;PartTranHist&quot;), EpiDataView)<br>        <br>        &#39;// End Wizard Added Variable Intialization <br>        &#39;// Begin Custom Method Calls </p><p>        If Not (edvPartTranHist.dataView.Table.Columns.Contains(&quot;EmployeeID&quot;)) Then<br>            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn(&quot;EmployeeID&quot;))<br>        End If<br>        <br>        If Not (edvPartTranHist.dataView.Table.Columns.Contains(&quot;EmployeeName&quot;)) Then<br>            edvPartTranHist.dataView.Table.Columns.Add(new DataColumn(&quot;EmployeeName&quot;))<br>        End If<br>        <br>        &#39;// End Custom Method Calls <br>    End Sub </p><p><br></p><p>    Sub DestroyCustomCode() </p><p><br>        &#39;// ** Wizard Insert Location - Do not delete &#39;Begin/End Wizard Added Object Disposal&#39; lines ** <br>        &#39;// Begin Wizard Added Object Disposal </p><p>        edvPartTranHist = Nothing<br>        <br>        &#39;// End Wizard Added Object Disposal <br>        &#39;// Begin Custom Code Disposal </p><p>        &#39;// End Custom Code Disposal <br>    End Sub </p><p>    <br>    Private Sub edvPartTranHist_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvPartTranHist.EpiViewNotification<br>        &#39;// ** Argument Properties and Uses **<br>        &#39;// view.dataView(args.Row)(&quot;[FieldName]&quot;)<br>        &#39;// args.Row, args.Column, args.Sender, args.NotifyType<br>        &#39;// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes<br>                AddEmployeeID()              <br>                AddEmployeeName()       <br>        If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then<br>            If (args.Row &gt; -1) Then<br>                                          <br>            End If<br>        End If<br>    End Sub</p><p><br>    Private Sub AddEmployeeID()<br>        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows<br>            If (dr(&quot;JobNum&quot;)) &gt; &quot;A&quot; Then<br>                dr(&quot;EmployeeID&quot;) = getEmployeeID(dr(&quot;JobNum&quot;))<br>            End If<br>        Next<br>    End Sub<br>    <br>    <br>    Private Sub AddEmployeeName()<br>        For Each dr As DataRow in edvPartTranHist.dataView.Table.Rows<br>            If (dr(&quot;JobNum&quot;)) &gt; &quot;A&quot; Then<br>                dr(&quot;EmployeeName&quot;) = getEmployeeName(dr(&quot;JobNum&quot;))<br>            End If<br>        Next<br>    End Sub<br>    </p><p>    Private Function getEmployeeID(ByVal job As String) As String<br>        Dim EmployeeID As String<br>        Dim myGrid As EpiUltraGrid = cType(csm.GetNativeControlReference(&quot;f83d6262-a7d9-4fb5-a7d0-54644a9bb66b&quot;), EpiUltraGrid)<br>        Dim adpJobEntry As JobEntryAdapter = New JobEntryAdapter(PartTranHistForm)<br>        adpJobEntry.BOConnect()<br>        <br>        Dim edvPartTranHist As EpiDataView = CType(oTrans.EpiDataViews(&quot;PartTranHist&quot;), EpiDataView)<br>        Dim result As Boolean = adpJobEntry.GetByID(job)<br>        <br>        Dim dsJobInfo As DataSet = adpJobEntry.JobEntryData<br>        Dim recordSelected As Boolean<br>        Dim showSearch As Boolean = False<br>        Dim whereClause As String = &quot;&#39;JobNum = &#39;&quot; + job + &quot;&#39;&quot;<br>&#39;            If recordSelected = True Then<br>&#39;            MsgBox(&quot;getEmployeeID recordSelected &quot; &amp; adpJobEntry.JobEntryData.JobHead(0)(&quot;JobNum&quot;))<br>                EmployeeID = adpJobEntry.JobEntryData.JobHead(0)(&quot;ShortChar04&quot;)<br>&#39;            Else<br>&#39;                EmployeeID = &quot;&quot;<br>&#39;            End If<br>        <br>        Return EmployeeID      <br>        <br>    End Function</p><p><br>    Private Function getEmployeeName(ByVal job As String) As String<br>        Dim EmployeeName As String<br>        Dim myGrid As EpiUltraGrid = cType(csm.GetNativeControlReference(&quot;f83d6262-a7d9-4fb5-a7d0-54644a9bb66b&quot;), EpiUltraGrid)<br>        Dim adpJobEntry As JobEntryAdapter = New JobEntryAdapter(PartTranHistForm)<br>        adpJobEntry.BOConnect()<br>        <br>        Dim edvPartTranHist As EpiDataView = CType(oTrans.EpiDataViews(&quot;PartTranHist&quot;), EpiDataView)<br>        Dim result As Boolean = adpJobEntry.GetByID(job)<br>        <br>        Dim dsJobInfo As DataSet = adpJobEntry.JobEntryData<br>        Dim recordSelected As Boolean<br>        Dim showSearch As Boolean = False<br>        Dim whereClause As String = &quot;&#39;JobNum = &#39;&quot; + job + &quot;&#39;&quot;<br>                EmployeeName = adpJobEntry.JobEntryData.JobHead(0)(&quot;ShortChar05&quot;)<br>        <br>        Return EmployeeName      <br>        <br>    End Function</p><p>End Module<br></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>


--

Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

Thanks for replying.  If it was any other grid I probably would but I'm really not sure I could get the running total working in a BAQ.
ah I see you are on 8.03... bummer unfortunately your best solution is the lookup you could try and run a BAQ from code that returns ALL the transactions for the given part with the info you need then the lookup is just in RAM and not a DB lookup every time


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Jun 16, 2016 at 7:58 AM, tracy.smith@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Thanks for replying.  If it was any other grid I probably would but I&#39;m really not sure I could get the running total working in a BAQ.</p>

</div><span class="ygrps-yiv-1000751094">
 


<div style="color:#fff;min-height:0;"></div>


Thanks Jose.  Think that might be a bit beyond me... I appreciate the advice though.
You know how to write a BAQ I assume? Write a BAQ that looks at part tran and does the Job Employee Linkn
Give the BAQ a condition WHERE PartNum='MYPART' (hard code) then you can use this code to excecute the BAQ and replace 'MYPART' with whichever part you want
Dim dq As New Epicor.Mfg.BO.DynamicQuery(_session.ConnectionPool)
Dim qds As Epicor.Mfg.BO.QueryDesignDataSet = dq.GetByID("YourQuery")
Dim dqds As Epicor.Mfg.BO.DynamicQueryDataSet = New Epicor.Mfg.BO.DynamicQueryDataSet()
dqds.Merge(qds, True, MissingSchemaAction.Ignore)

dqds.QueryWhereItem(0).RValue = "Myval"

Dim ds AS DataSet = dq.Execute(dqds)


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Jun 16, 2016 at 8:30 AM, tracy.smith@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Thanks Jose.  Think that might be a bit beyond me... I appreciate the advice though.</p>

</div><span class="ygrps-yiv-1837702650">
 


<div style="color:#fff;min-height:0;"></div>