Object reference not set to an instance of an object

Thanks Jose - I created an FKV PODtlPart linked to PODetail and then created an STV for PODtPtUom. What do I need to do to access the ConvFactor?

 

Regards

 

Adrian Lauchlan FRSA

 

 

mobile 07852 270968

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: 22 May 2015 17:35
To: Vantage
Subject: Re: [Vantage] Object reference not set to an instance of an object

 

 

Hi Adrian,

The View you are trying to access "PoDtPtUom" does not exist in the PO Form.... Not sure if you added that view via a FKV? but that's why you are getting that error.

 

 



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

On Fri, May 22, 2015 at 8:39 AM, adrianlauchlan@... [vantage] <vantage@yahoogroups.com> wrote:

 

I am getting an error msg 'Object reference not set to an instance of an object' with the code below for a PO Entry. The PO Screen has to be closed and reopened. Can anyone see what is wrong?

 

Private Sub PODetail_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)

'** Argument Properties and Uses **

'args.Row("[FieldName]")

'args.Column, args.ProposedValue, args.Row

'Add Event Handler Code

Dim workDataView As EpiDataView = CType(oTrans.EpiDataViews("PODetail"), EpiDataView)

Dim workDataView2 As EpiDataView = CType(oTrans.EpiDataViews("PoDtPtUom"), EpiDataView)

'Messagebox.show(workDataView2.dataview.count.tostring())

    if workDataView2.dataview.count < 1 then return

 

Dim PartNum As String = workDataView.dataView(workDataView.Row)("PartNum")

Dim PUM As String = workDataView.dataView(workDataView.Row)("PUM")

Dim IUM As String = workDataView.dataView(workDataView.Row)("IUM")

DIM ConvFactor as Decimal = workDataView2.dataView(workDataView2.Row)("ConvFactor")

 

Select Case args.Column.ColumnName

Case "PartNum"

if PartNum <> "" then

Math.Round(ConvFactor, 2)

 'Messagebox.show("1 Purchaed " + PUM + " = " + ConvFactor.toString() + " " + IUM + " Inventory Items")

end if

Case Else

End Select

End Sub

Private Sub SearchOnEmpBasicAdapterFillDropDown()

Dim recSelected As Boolean

Dim whereClause As String = String.Empty

Dim dsEmpBasicAdapter As System.Data.DataSet = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "EmpBasicAdapter", recSelected, False, whereClause)

If recSelected Then

'Set EpiUltraCombo Properties

DeliverTo.ValueMember = "EmpID"

DeliverTo.DataSource = dsEmpBasicAdapter

DeliverTo.DisplayMember = "Name"

Dim fields() As String = New String() {"EmpID"}

DeliverTo.SetColumnFilter(fields)

End If

End Sub

 

 

Private Sub POEntryForm_Load(ByVal sender As Object, ByVal args As EventArgs)

'Add Event Handler Code

SearchOnEmpBasicAdapterFillDropDown()

End Sub

 

 

End Module 

 

 

 

Anyone seen/understand how to get rid of this error?

My stack trace is as follows:

Stack Trace
===========
at Epicor.Mfg.UI.FrameWork.EpiUIUtils.reParentEpiButtonEpiKeyFields()
I've received this error a number of reasons: when I tried to set a
object to a data type that it isn't designed for is the most common.
I'm assuming you're working with a customization? EpiKeyField is
either true or false. Possibly your data is trying to set it to
something else.

--- In vantage@yahoogroups.com, "dub554" <mbarron@...> wrote:
>
> Anyone seen/understand how to get rid of this error?
>
> My stack trace is as follows:
>
> Stack Trace
> ===========
> at
Epicor.Mfg.UI.FrameWork.EpiUIUtils.reParentEpiButtonEpiKeyFields()
>
I've received this error a number of reasons: when I tried to set a
object to a data type that it isn't designed for is the most common.
I'm assuming you're working with a customization? EpiKeyField is
either true or false. Possibly your data is trying to set it to
something else.

--- In vantage@yahoogroups.com, "dub554" <mbarron@...> wrote:
>
> Anyone seen/understand how to get rid of this error?
>
> My stack trace is as follows:
>
> Stack Trace
> ===========
> at
Epicor.Mfg.UI.FrameWork.EpiUIUtils.reParentEpiButtonEpiKeyFields()
>
Whenever I get this error, the first thing I do is open up the
customization. Go into the customization in developer mode and go
to "Tools" "Custom XML Editor". Now go to the "Custom Controls" tab
and look for a customized item that has a blank Parent Control Key.
This can happen when you delete a parent (group) without deleting
the children (controls) first. (The control is there but it can't
be found anywhere in the tree view.) On that grid, you can delete
the row with the problem.

I recommend making sure the customization has been exported first so
that if you delete something you should not have (that did happen to
me once), you can re-import it.

-Peter Volkert

--- In vantage@yahoogroups.com, "Steven Pybus" <steven@...> wrote:
>
> I've received this error a number of reasons: when I tried to set
a
> object to a data type that it isn't designed for is the most
common.
> I'm assuming you're working with a customization? EpiKeyField is
> either true or false. Possibly your data is trying to set it to
> something else.
>
> --- In vantage@yahoogroups.com, "dub554" <mbarron@> wrote:
> >
> > Anyone seen/understand how to get rid of this error?
> >
> > My stack trace is as follows:
> >
> > Stack Trace
> > ===========
> > at
> Epicor.Mfg.UI.FrameWork.EpiUIUtils.reParentEpiButtonEpiKeyFields()
> >
>

I am getting an error msg 'Object reference not set to an instance of an object' with the code below for a PO Entry. The PO Screen has to be closed and reopened. Can anyone see what is wrong?


Private Sub PODetail_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)

'** Argument Properties and Uses **

'args.Row("[FieldName]")

'args.Column, args.ProposedValue, args.Row

'Add Event Handler Code

Dim workDataView As EpiDataView = CType(oTrans.EpiDataViews("PODetail"), EpiDataView)

Dim workDataView2 As EpiDataView = CType(oTrans.EpiDataViews("PoDtPtUom"), EpiDataView)

'Messagebox.show(workDataView2.dataview.count.tostring())

    if workDataView2.dataview.count < 1 then return


Dim PartNum As String = workDataView.dataView(workDataView.Row)("PartNum")

Dim PUM As String = workDataView.dataView(workDataView.Row)("PUM")

Dim IUM As String = workDataView.dataView(workDataView.Row)("IUM")

DIM ConvFactor as Decimal = workDataView2.dataView(workDataView2.Row)("ConvFactor")


Select Case args.Column.ColumnName

Case "PartNum"

if PartNum <> "" then

Math.Round(ConvFactor, 2)

 'Messagebox.show("1 Purchaed " + PUM + " = " + ConvFactor.toString() + " " + IUM + " Inventory Items")

end if

Case Else

End Select

End Sub

Private Sub SearchOnEmpBasicAdapterFillDropDown()

Dim recSelected As Boolean

Dim whereClause As String = String.Empty

Dim dsEmpBasicAdapter As System.Data.DataSet = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "EmpBasicAdapter", recSelected, False, whereClause)

If recSelected Then

'Set EpiUltraCombo Properties

DeliverTo.ValueMember = "EmpID"

DeliverTo.DataSource = dsEmpBasicAdapter

DeliverTo.DisplayMember = "Name"

Dim fields() As String = New String() {"EmpID"}

DeliverTo.SetColumnFilter(fields)

End If

End Sub



Private Sub POEntryForm_Load(ByVal sender As Object, ByVal args As EventArgs)

'Add Event Handler Code

SearchOnEmpBasicAdapterFillDropDown()

End Sub



End Module 



Adrian,

Looks like you have problems in the AfterfieldChange, you added the view that you are trying to access?... let me know if you would like some help.
 
Carlos Madero
Senior Consultant
Mayan Technologies Inc.
www.mayantechs.com



On Friday, May 22, 2015 7:39 AM, "adrianlauchlan@... [vantage]" <vantage@yahoogroups.com> wrote:


 
<div id="ygrps-yiv-1400365285yiv2837046643ygrp-text">
  
  
  <div></div><div>I am getting an error msg &#39;Object reference not set to an instance of an object&#39; with the code below for a PO Entry. The PO Screen has to be closed and reopened. Can anyone see what is wrong?<br clear="none"></div><div><br clear="none"></div><div>Private Sub PODetail_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>&#39;** Argument Properties and Uses **</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>&#39;args.Row(&quot;[FieldName]&quot;)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>&#39;args.Column, args.ProposedValue, args.Row</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>&#39;Add Event Handler Code</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim workDataView As EpiDataView = CType(oTrans.EpiDataViews(&quot;PODetail&quot;), EpiDataView)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim workDataView2 As EpiDataView = CType(oTrans.EpiDataViews(&quot;PoDtPtUom&quot;), EpiDataView)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>&#39;Messagebox.show(workDataView2.dataview.count.tostring())</div><div>&nbsp; &nbsp; if workDataView2.dataview.count &lt; 1 then return</div><div><br clear="none"></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim PartNum As String = workDataView.dataView(workDataView.Row)(&quot;PartNum&quot;)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim PUM As String = workDataView.dataView(workDataView.Row)(&quot;PUM&quot;)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim IUM As String = workDataView.dataView(workDataView.Row)(&quot;IUM&quot;)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>DIM ConvFactor as Decimal = workDataView2.dataView(workDataView2.Row)(&quot;ConvFactor&quot;)</div><div><br clear="none"></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Select Case args.Column.ColumnName</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>Case &quot;PartNum&quot;</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>if PartNum &lt;&gt; &quot;&quot; then</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">					</span>Math.Round(ConvFactor, 2)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">				</span> &nbsp;&#39;Messagebox.show(&quot;1 Purchaed &quot; + PUM + &quot; = &quot; + ConvFactor.toString() + &quot; &quot; + IUM + &quot; Inventory Items&quot;)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>end if</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>Case Else</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>End Select</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span>End Sub</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span>Private Sub SearchOnEmpBasicAdapterFillDropDown()</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="word-spacing:normal;white-space:pre;">	</span><span style="word-spacing:normal;">Dim recSelected As Boolean</span></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim whereClause As String = String.Empty</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>Dim dsEmpBasicAdapter As System.Data.DataSet = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, &quot;EmpBasicAdapter&quot;, recSelected, False, whereClause)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>If recSelected Then</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>&#39;Set EpiUltraCombo Properties</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>DeliverTo.ValueMember = &quot;EmpID&quot;</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>DeliverTo.DataSource = dsEmpBasicAdapter</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>DeliverTo.DisplayMember = &quot;Name&quot;</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>Dim fields() As String = New String() {&quot;EmpID&quot;}</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">			</span>DeliverTo.SetColumnFilter(fields)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>End If<span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span>End Sub</div><div><br clear="none"></div><div><br clear="none"></div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span>Private Sub POEntryForm_Load(ByVal sender As Object, ByVal args As EventArgs)</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">		</span>&#39;Add Event Handler Code</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span>SearchOnEmpBasicAdapterFillDropDown()</div><div><span class="ygrps-yiv-1400365285yiv2837046643Apple-tab-span" style="white-space:pre;">	</span>End Sub</div><div><br clear="none"></div><div><br clear="none"></div><div></div><div>End Module&nbsp;</div><div><br clear="none"></div><div><span><br clear="none" class="ygrps-yiv-1400365285yiv2837046643yui-cursor"></span></div>

</div>
 


<div style="color:#fff;height:0;"></div></div>
#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643 -- #ygrps-yiv-1400365285yiv2837046643ygrp-mkp { border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mkp #ygrps-yiv-1400365285yiv2837046643hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mkp #ygrps-yiv-1400365285yiv2837046643ads {
margin-bottom:10px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mkp .ygrps-yiv-1400365285yiv2837046643ad {
padding:0 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mkp .ygrps-yiv-1400365285yiv2837046643ad p {
margin:0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mkp .ygrps-yiv-1400365285yiv2837046643ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-sponsor #ygrps-yiv-1400365285yiv2837046643ygrp-lc {
font-family:Arial;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-sponsor #ygrps-yiv-1400365285yiv2837046643ygrp-lc #ygrps-yiv-1400365285yiv2837046643hd {
margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-sponsor #ygrps-yiv-1400365285yiv2837046643ygrp-lc .ygrps-yiv-1400365285yiv2837046643ad {
margin-bottom:10px;padding:0 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643activity span {
font-weight:700;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643activity span:first-child {
text-transform:uppercase;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643activity span a {
color:#5085b6;text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643activity span span {
color:#ff7900;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643activity span .ygrps-yiv-1400365285yiv2837046643underline {
text-decoration:underline;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643attach div a {
text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643attach img {
border:none;padding-right:5px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643attach label {
display:block;margin-bottom:5px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643attach label a {
text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 blockquote {
margin:0 0 0 4px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643bold {
font-family:Arial;font-size:13px;font-weight:700;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643bold a {
text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 dd.ygrps-yiv-1400365285yiv2837046643last p a {
font-family:Verdana;font-weight:700;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 dd.ygrps-yiv-1400365285yiv2837046643last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 dd.ygrps-yiv-1400365285yiv2837046643last p span.ygrps-yiv-1400365285yiv2837046643yshortcuts {
margin-right:0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643attach-table div div a {
text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643attach-table {
width:400px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643file-title a, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643file-title a:active, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643file-title a:hover, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643file-title a:visited {
text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643photo-title a, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643photo-title a:active, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643photo-title a:hover, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div.ygrps-yiv-1400365285yiv2837046643photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 div#ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg #ygrps-yiv-1400365285yiv2837046643ygrp-msg p a span.ygrps-yiv-1400365285yiv2837046643yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643green {
color:#628c2a;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643MsoNormal {
margin:0 0 0 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 o {
font-size:0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643photos div {
float:left;width:72px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643photos div div {
border:1px solid #666666;height:62px;overflow:hidden;width:62px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643reco-category {
font-size:77%;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643reco-desc {
font-size:77%;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 .ygrps-yiv-1400365285yiv2837046643replbq {
margin:4px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg table {
font-size:inherit;font:100%;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg select, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 input, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg pre, #ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 code {
font:115% monospace;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg * {
line-height:1.22em;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-mlmsg #ygrps-yiv-1400365285yiv2837046643logo {
padding-bottom:10px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-msg p a {
font-family:Verdana;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-msg p#ygrps-yiv-1400365285yiv2837046643attach-count span {
color:#1E66AE;font-weight:700;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-reco #ygrps-yiv-1400365285yiv2837046643reco-head {
color:#ff7900;font-weight:700;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-reco {
margin-bottom:20px;padding:0px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-sponsor #ygrps-yiv-1400365285yiv2837046643ov li a {
font-size:130%;text-decoration:none;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-sponsor #ygrps-yiv-1400365285yiv2837046643ov li {
font-size:77%;list-style-type:square;padding:6px 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-sponsor #ygrps-yiv-1400365285yiv2837046643ov ul {
margin:0;padding:0 0 0 8px;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-text {
font-family:Georgia;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-text p {
margin:0 0 1em 0;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-text tt {
font-size:120%;}

#ygrps-yiv-1400365285 #ygrps-yiv-1400365285yiv2837046643 #ygrps-yiv-1400365285yiv2837046643ygrp-vital ul li:last-child {
border-right:none !important;}
#ygrps-yiv-1400365285



Hi Adrian,
The View you are trying to access "PoDtPtUom" does not exist in the PO Form.... Not sure if you added that view via a FKV? but that's why you are getting that error.




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Fri, May 22, 2015 at 8:39 AM, adrianlauchlan@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p>I am getting an error msg &#39;Object reference not set to an instance of an object&#39; with the code below for a PO Entry. The PO Screen has to be closed and reopened. Can anyone see what is wrong?<br></p><p><br></p><p>Private Sub PODetail_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)</p><p><span style="white-space:pre-wrap;">		</span>&#39;** Argument Properties and Uses **</p><p><span style="white-space:pre-wrap;">		</span>&#39;args.Row(&quot;[FieldName]&quot;)</p><p><span style="white-space:pre-wrap;">		</span>&#39;args.Column, args.ProposedValue, args.Row</p><p><span style="white-space:pre-wrap;">		</span>&#39;Add Event Handler Code</p><p><span style="white-space:pre-wrap;">		</span>Dim workDataView As EpiDataView = CType(oTrans.EpiDataViews(&quot;PODetail&quot;), EpiDataView)</p><p><span style="white-space:pre-wrap;">		</span>Dim workDataView2 As EpiDataView = CType(oTrans.EpiDataViews(&quot;PoDtPtUom&quot;), EpiDataView)</p><p><span style="white-space:pre-wrap;">		</span>&#39;Messagebox.show(workDataView2.dataview.count.tostring())</p><p>    if workDataView2.dataview.count &lt; 1 then return</p><p><br></p><p><span style="white-space:pre-wrap;">		</span>Dim PartNum As String = workDataView.dataView(workDataView.Row)(&quot;PartNum&quot;)</p><p><span style="white-space:pre-wrap;">		</span>Dim PUM As String = workDataView.dataView(workDataView.Row)(&quot;PUM&quot;)</p><p><span style="white-space:pre-wrap;">		</span>Dim IUM As String = workDataView.dataView(workDataView.Row)(&quot;IUM&quot;)</p><p><span style="white-space:pre-wrap;">		</span>DIM ConvFactor as Decimal = workDataView2.dataView(workDataView2.Row)(&quot;ConvFactor&quot;)</p><p><br></p><p><span style="white-space:pre-wrap;">		</span>Select Case args.Column.ColumnName</p><p><span style="white-space:pre-wrap;">			</span>Case &quot;PartNum&quot;</p><p><span style="white-space:pre-wrap;">			</span>if PartNum &lt;&gt; &quot;&quot; then</p><p><span style="white-space:pre-wrap;">					</span>Math.Round(ConvFactor, 2)</p><p><span style="white-space:pre-wrap;">				</span>  &#39;Messagebox.show(&quot;1 Purchaed &quot; + PUM + &quot; = &quot; + ConvFactor.toString() + &quot; &quot; + IUM + &quot; Inventory Items&quot;)</p><p><span style="white-space:pre-wrap;">			</span>end if</p><p><span style="white-space:pre-wrap;">			</span>Case Else</p><p><span style="white-space:pre-wrap;">		</span>End Select</p><p><span style="white-space:pre-wrap;">	</span>End Sub</p><p><span style="white-space:pre-wrap;">	</span>Private Sub SearchOnEmpBasicAdapterFillDropDown()</p><p><span style="white-space:pre-wrap;">	</span></p><p><span style="white-space:pre-wrap;">	</span><span style="word-spacing:normal;white-space:pre-wrap;">	</span><span style="word-spacing:normal;">Dim recSelected As Boolean</span></p><p><span style="white-space:pre-wrap;">		</span>Dim whereClause As String = String.Empty</p><p><span style="white-space:pre-wrap;">	</span></p><p><span style="white-space:pre-wrap;">		</span>Dim dsEmpBasicAdapter As System.Data.DataSet = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, &quot;EmpBasicAdapter&quot;, recSelected, False, whereClause)</p><p><span style="white-space:pre-wrap;">		</span>If recSelected Then</p><p><span style="white-space:pre-wrap;">			</span>&#39;Set EpiUltraCombo Properties</p><p><span style="white-space:pre-wrap;">			</span>DeliverTo.ValueMember = &quot;EmpID&quot;</p><p><span style="white-space:pre-wrap;">			</span>DeliverTo.DataSource = dsEmpBasicAdapter</p><p><span style="white-space:pre-wrap;">			</span>DeliverTo.DisplayMember = &quot;Name&quot;</p><p><span style="white-space:pre-wrap;">			</span>Dim fields() As String = New String() {&quot;EmpID&quot;}</p><p><span style="white-space:pre-wrap;">			</span>DeliverTo.SetColumnFilter(fields)</p><p><span style="white-space:pre-wrap;">		</span>End If<span style="white-space:pre-wrap;">	</span></p><p><span style="white-space:pre-wrap;">	</span>End Sub</p><p><br></p><p><br></p><p><span style="white-space:pre-wrap;">	</span>Private Sub POEntryForm_Load(ByVal sender As Object, ByVal args As EventArgs)</p><p><span style="white-space:pre-wrap;">		</span>&#39;Add Event Handler Code</p><p><span style="white-space:pre-wrap;">	</span>SearchOnEmpBasicAdapterFillDropDown()</p><p><span style="white-space:pre-wrap;">	</span>End Sub</p><p><br></p><p><br></p><p></p><p>End Module </p><div><br></div><p><span><br></span></p><p></p>

</div>
 


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